Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-18-2020 09:23 AM
How to synchronise my Postgre SQL database which is running on AWS RDS with the Neo4j instance running on EC2. The data should be synchronised in real time. For every new entry added to the SQL database a node should be created on my graph database.
03-18-2020 02:12 PM
This is the kind of data synchronising issue addressed by products like Confluent, an event streaming platform built around Apache Kafka.
It requires setup, but you can use configure a component to watch the binary logs of your postgres db, send them to Kafka, and then sink those changes to Neo4j, all in realtime.
A much simpler option would be to schedule a cypher statement to execute (every minute for example) and use the jdbc connector to run a select query against postgres, and turn the results into nodes & relationships. It isn't strictly realtime, but your use case may be able to tolerate 1 minute delays, for the sake of a much easier implementation.
Good luck!
03-19-2020 08:19 AM
Thank you Terry, will try with Kafka Streams
03-19-2020 06:18 PM
Agree with @terryfranklin82, if you're looking for real-time data, look into Apache Kafka as a distributed data messaging system.
Otherwise you could have your API that is communicating to PostgreSQL also do the communicating with Neo4j, in a multi-cast style of sending data to two data stores. Not a solution that scales well in the mircro-service paradigm but simpler to implement.
03-20-2020 08:43 AM
Thank you all for the response, I have integrated Amazon Kinesis to create the data stream along with Lambda to trigger the Cypher query to push it into Graph database and it is working fine.
All the sessions of the conference are now available online