Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-10-2020 01:48 PM
I am looking for a way to listen for a specific event in Neo4j, and the moment it occurs update a browser-only javascript web app. The event itself is the assignment of a specific property key to a node. It should happen real-time.
I feel it would create an overhead to poll the database for updates from the javascript app, particulary if there are a lot of types of events to monitor.
Neo4j itself offers triggers and the 'assignedNodeProperties' event and it can cause follow-on cypher queries to be invoked. If neo4j could push a message at that moment, it would be enough.
The Bolt javascript driver has reactive features but I can't see how to apply them to this. That would be an ideal place for this functionality.
I have experimented with a different database that accepts a socket connection and a subscription to updates for a specific data stream. The browser-only javascript app works fine with that solution.
Am I overlooking something?
11-11-2020 12:54 AM
Hi @mojo2go,
The closest fit may be neo4j-streams, as mentioned here: Realtime notifications of node changes
You're right to observe that the reactive driver features suggest the possibility of keeping a query "open" to get updates as they arrive, but that's not yet supported.
-ABK
11-12-2020 12:59 AM
Thanks Andreas,
Adding Kafka to the picture looks like it's going to solve the problem--as well as offer a foundation for infinite other integration possibilities. I'll try it out.
All the sessions of the conference are now available online