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.
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.