What is Nostr?
Jay [MOVED HERE]
npub10mt…27hf
2025-01-30 21:15:19
in reply to nevent1q…u5pt

Jay [MOVED HERE] on Nostr: Currently no just because there's nothing there yet. I want to migrate to golang ...

Currently no just because there's nothing there yet. I want to migrate to golang before I continue, but the problem has a fairly easy solution:

1. Get events via websocket from clients and other relays. Immediately store them in lmdb.
2. Put the events IDs in a persisted queue, available between restarts.
3. Subscribers pop events IDs and begin a transaction with neo4j to import the event itself and either succeed, retry, or fail to import it - so the transaction completes or is rolled back and cancelled.

With some event presorting in the queue, you can batch similar events for some more efficiency using UNWIND strategies for merging many nodes/rels into the database.
Author Public Key
npub10mtatsat7ph6rsq0w8u8npt8d86x4jfr2nqjnvld2439q6f8ugqq0x27hf