Fall Biff updates

1 Like

Genuinely excited about the roadmap. I have been rewriting old Luminus stuff with Biff (to get easy XTDB support) and I love your take on DX and simplicity.

Thanks for open-sourcing Yakread! I will get a subscription as a token of appreciation.

A couple questions, if you don’t mind:

What do you think of XTDB2 and the change to XTQL? I know you plan to have Biff use SQL by default so I guess you will upgrade soon? Will you use XTQL in your own projects (e.g. for the platypub rewrite), and will it feature prominently in the biff docs and code examples?

Thanks for all the great work.

Glad to hear it! For XTDB2–I won’t have XTDB2 be the default until it’s stable, but I might make a separate branch on the Biff repo that uses XTDB2 in the mean time. I’m not in a rush to upgrade in any case. I’ll need to figure out what the migration path will look like for people who want to upgrade their existing Biff apps to XTDB2, while maintaining backwards compatibility for XTDB1 (Yakread will probably stay on XTDB1, for instance). And then there’s all the documentation. Probably need to start keeping/maintining multiple versions of the docs, which will require some significant updates to the Biff website source. This has all been on the horizon for a long time :slightly_smiling_face:

For XTQL, I’m not exactly sure what the plan will be. I am still planning to have SQL be the default at least. I don’t know whether or not it’ll be worth the effort to also write and maintain separate code/docs for XTQL (e.g. in the template app I could translate all the SQL queries to XTQL and then comment out the latter). I like the idea of featuring XTQL prominently, but given that my time is limited it may end up being best to just focus on SQL. I can always write a separate how-to doc or similar that gives some code examples for XTQL + Biff.

As for the query language/DML itself–I spent some time looking through some early-access docs a couple weeks ago. It looks quite powerful / easier to write complex queries. And the DML portion of it looks really nice too–much easier to do complex operations without needing to write transaction functions. My two main concerns that I shared with the team are that it looked pretty verbose for simple queries in some instances (like nested pulls), and I wasn’t sure if it would even be possible to make Biff’s schema enforcement work with the DML. Speaking of which, the same concern applies to SQL actually–if you do a UPDATE users SET ..., I’m not sure there’d be any way for Biff to apply Malli schemas to that.

I believe the low-level put operations will still be available, so what I may end up doing is still have a custom Biff transaction format that looks more-or-less the same as it does today and is implemented the same way. But then for queries, the template app would use SQL by default. But ultimately I’ll just need to wait and see what things end up looking like by the time XTDB2 is stable, and I’ll need to spend more time experimenting with the code to see what’s possible.

1 Like

Thank you for the detailed and thoughtful answer, as always :slight_smile:

1 Like