Fork me on GitHub
#biff
<
2023-09-07
>
Martynas Maciulevičius08:09:54

Hey. I'd like to know what is the best way to modify the installation script to install dependencies. For instance I'd like to install the dependencies once when I do bb deploy and then I'd not like to do it again on consecutive calls :thinking_face: I'm completely fine if I could run my own shellscript/babashkascript during deploy :thinking_face: I can also run my initialization when the app starts. But I thought whether I should do something better, if possible.

Jacob O'Bryant14:09:05

what kind of dependencies do you mean? The ones installed by server-setup.sh? or libraries in deps.edn?

Jacob O'Bryant16:09:38

assuming you mean server dependencies--you can just ssh into the server and install them by hand. And then be sure to edit your server-setup.sh file so it installs the dependencies, in case you ever need to provision a new server.

Martynas Maciulevičius16:09:38

> And then be sure to edit your I did this but this seems inelegant. But well... it works. :man-shrugging:

Jacob O'Bryant16:09:36

gets the job done 😉

Chip17:09:52

First time hearing of Biff. Thanks for https://clojurians.slack.com/archives/C8NUSGWG6/p1694104169560209. Phase 1 of my project is a chatbot interface to a set of evolving backend knowledge graphs. https://en.wikipedia.org/wiki/Word_embedding# and connection to one or more LLMs is mixed in. Based on that brief description, does investigating Biff make sense? Up to this point, I’ve been assuming a full-stack, Datomic/Ion system.

Chip17:09:38

My first concern is the graph nature of my system’s backend.

Jacob O'Bryant17:09:27

Hi! Yeah, it sounds like something that Biff would potentially be a good fit for. The main thing you'll probably want to do is play around with XTDB a bit to get a feel for it. It has Datalog graph queries similar to Datomic, though the way you store data is fundamentally different (documents instead of datoms). I think at one point I was using XTDB for storing word embeddings from fastText--worked fine for me, though it wasn't a huge system in terms of load or anything 🙂

gratitude-thank-you 2
Chip17:09:33

Is there an XTDB playground somewhere that you’ve seen?

Jacob O'Bryant18:09:39

I'm not sure if any of them are interactive, but there are some tutorials here: https://www.xtdb.com/learn Probably the best way to start is to try out an in-memory node and play with it in the repl prompt:

$ clj -Sdeps '{:deps {com.xtdb/xtdb-core {:mvn/version "1.23.1"}}}'
user=> (require '[xtdb.api :as xt])
nil
user=> (def node (xt/start-node {}))
#'user/node
You can also start a new biff project and then there'll be a repl.clj file that has some example code for submitting transactions and running queries. Though note that Biff has its own https://biffweb.com/docs/reference/transactions/ that wraps XT's transactions--probably best to learn plain XT first.

Chip18:09:13

Thank you very much.

👌 2
Chip18:09:44

I’ve fired up Biff and am getting my feet wet.

Jacob O'Bryant18:09:04

Cool, happy to answer any other questions you run into.

Chip18:09:51

As you know, dealing with new tech on a tough project can get and stay painful. It helps knowing there’s support. Thanks again.

🙂 2