cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Neo4j triggers + Javascript Bolt to monitor Neo4j events

mojo2go
Graph Buddy

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?

2 REPLIES 2

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

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.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online