-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Where do we initialize the connection? Is it in a global variable? If not, should we create a new connection each time we need to run a query? And, are these connections auto managed by a pool? #107
Comments
I'm using Axum and keep a |
Hey! Thanks for sharing the insight. I am using a global varibale, |
Under the hood, a connection pool is used (and its size can be configured with We don't have sessions in the Rust driver yet. |
@knutwalker Thanks for the insight :) |
@knutwalker What is a session, to be exact, in the context of Neo4j driver? |
The definition of a session is "A causally linked sequence of transactions.". What that means is, that you've got an abstraction that allows you to run multiple transactions after one another in a way that enforces causal consistency on the database cluster, that is, make sure your queries are consistent to the rules that a Neo4j cluster provides (for example, you typically want to read your own writes). You need to work and handle so called bookmarks to do that and a session is an abstraction where this handling is done for you, by the driver. A session might be pinned to a single connection, so all queries run over the same connection (In We don't support bookmark support in |
@knutwalker Thank you so much for taking the time to explain very clearly! |
Also many thanks for the awesome work on neo4rs. For this crate, I could move my backend to Rust ecosystem:) |
Thanks for the feedback, that's great to hear :) |
No description provided.
The text was updated successfully, but these errors were encountered: