Fork me on GitHub
#fulcro
<
2021-05-15
>
Hukka07:05:32

The dev guide mentions: > Meteor-style subscription models need not be an internal part of the library. If you have a database that can tell you when data changes then you can either re-run your graph query to pull those changes or merge in new graph of data that arrives from some arbitrary websocket push. Is there anything even close to ready made solution for pushing changes to fulcro clients based on the UI queries of connected clients, or would that mean a custom implementation of the rete algorithm or something like that? Postgres has notify, but that would mean a recalculation for every client I guess (which is not unfeasible for smallish amounts), seems like datomic transaction queue would be effectively the same (get notified for every change, not just those matching a query). No idea if meteor/mongodb has anything more sophisticated.

Hukka07:05:09

I admit that I haven't really looked into the differential datalog or differential dataflow libraries (algorithms? architectures?), though I have the impression that they wouldn't be very ready to just plug in as is

lilactown15:05:39

I don't know of any ready made solutions. The GraphQL community has sort of started to solve this problem with their notion of GraphQL "subscriptions"

lilactown15:05:54

IIRC determining what queries have changed after a change to the underlying datasource (i.e. postgres notify, datomic transaction log) is done on the server and then pushed to clients who are actively listening to those

lilactown15:05:47

differential dataflow could fit in here as "just another datasource," although if you go all in on it you could perhaps use it as the engine to discern what queries have changed

lilactown15:05:09

all this being said, nothing I've heard about is plug-and-play for fulcro

Hukka16:05:31

Suspected as much, thanks

lgessler00:05:36

I'm planning to implement something like this using Crux, which allows you to watch transactions, and have some ideas. But yeah, nothing ready-made afaik

lgessler00:05:11

If you end up doing something similar with whatever db you're using maybe it'd be nice to chat :)

Hukka07:05:32

While it would be fun, I couldn't really justify the effort :man-frowning: We don't have any particular needs for it, apart from having slightly better user experience if there are no poll delays or need to refresh the page manually

Hukka07:05:29

Would be still interesting to know why Crux! It's on my todo list to read about, so I don't know how it compares to datomic, rethinkdb, kafka etc. My very preliminary impression is that it's closest to datomic, but open source

Hukka18:05:16

Found https://findka.com/blog/migrating-to-biff/ which is using Crux and Sente for non-joined subscriptions. Could be interesting to check that out. Also I've been reading more about Crux now and the bitemporality might actually be a really nice thing to have for the next "project" we are going to build

Jakub Holý (HolyJak)15:05:27

Good news everyone! I have finally fixed CI of https://fulcro-community.github.io/ and related projects so that the website will be correctly updated when any of the constituent repos is updated. That also means that https://fulcro-community.github.io/main/awesome-fulcro/README.html is finally up to date.

👍 11
👏 5