Hacker News new | ask | show | jobs
by michelpp 433 days ago
Main contributor here, had a lot of fun working with automerge and its amazing C API around the core Rust library and collaborating with Supabase. This allowed me to take advantage of expanded datum features and improvement in postgres 18 driven by a feature I needed for another project storing large in-memory sparse matrices [1][2]. Based on these new features, lots of rich object data model API can now be used very efficiently from sql when doing multiple complex operations in a function.

This is still experimental bleeding edge stuff that's only available on the unreleased pg 18 so far (using the current dev mainline branch) but will open up a lot of possibilities in the future. Future improvements I hope to make to pg_crdt include implementing the sync() api for easy peer-to-peer synchronization and a full round-trip example application. Word is automerge 3.0 will have some nice new features and I look forward to that.

As an HN specific side note, there was a choice to make initially to use either Rust via pgrx or the automerge C API. At the time (and maybe still?) pgrx did not support expanded datum, which I think would be an amazing addition, but it was out of my scope, and my familiarity with the postgres C extension API made us choose C. Happy to discuss further improvements in this regard as I go up the Rust learning curve myself.

[1] https://www.postgresql.org/message-id/flat/647219.1736019347...

[2] https://onesparse.com/docs.html