Fork me on GitHub
#xtdb
<
2019-09-06
>
fjolne09:09:24

Hi there! Wonder how one would go about implementing Pub/Sub based on Crux. Seems like one could subscribe to Kafka logs and then follow them to the KV store manually. Or is there a public API I’m missing? Any thoughts appreciated

refset10:09:43

Hey! Great question, definitely one for the FAQs. This is what a hypothetical crux-3df module (as mentioned above) would give plus a lot more. Right now your current idea is probably the right choice. You may be able to filter for transactions containing documents of interest (based on entity ID namespaces or known attributes / attribute-value combinations). We haven't built anything generic that solves this yet.

refset10:09:55

If you have a clear project in mind that you need this for then we would be happy to discuss what's possible in the near future on a call, but if you're just experimenting then it's also fine to keep talking here 🙂

refset10:09:13

I think subscriptions and streaming queries are fascinating!

fjolne13:09:51

Thanks for response! The project in question is a chat integration for our CLJ/CLJS app. Currently we use Firebase’s Realtime Database, and I’m anxious to migrate to something with a better query support — ideally with Datalog ofc 🙂

🤞 4
fjolne13:09:12

clj-3df looks awesome, didn’t know about it. Would definitely vote for crux-3df!

🙂 4
hoppy18:09:25

the section in the docs which talks about valid IDs should, IMHO, at least give a nod to the underlying types that can be used (aka java.NET.uri). The reader literal is cool and all, but not much use when you are computing this IDs on the fly. This assumes, of course, that the intent was to use it this way in the first place.

👍 4
refset19:09:41

Good idea, thanks! I've just add a new paragraph.