Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-02-2021 02:00 AM
I have a node js project where one of DBs is neo4j. Currently there are three main function I do with neo4j create, update, delete. Since there are cases when I create 1 Million nodes or relationships I need to send them by chunks. So long I was creating and closing driver and session every time I was doing transaction. Now I want to understand when to open driver and when open session? When should I use reactive sessions? So far I found out , that dirve.close() should be implemented right before my server closes.
Form github I didn't understood what they mean by Create a reactive session to run Cypher statements in. I assume I will write cypher code anyway what is the difference reactive makse ?
Solved! Go to Solution.
11-14-2021 10:53 AM
Reactive is an more efficient use of resources esp. if you have many clients reading the data.
For you it might not make so much of a difference as the node API is already working with promises.
Yes you should only create the driver once and then close it when your app closes.
But you should create a new session for each new batch/block.
You can still attach multiple transactions to that session if you need to do multiple operations.
11-14-2021 10:53 AM
Reactive is an more efficient use of resources esp. if you have many clients reading the data.
For you it might not make so much of a difference as the node API is already working with promises.
Yes you should only create the driver once and then close it when your app closes.
But you should create a new session for each new batch/block.
You can still attach multiple transactions to that session if you need to do multiple operations.
All the sessions of the conference are now available online