neo4jrb / neo4j-core

A simple unified API that can access both the server and embedded Neo4j database. Used by the neo4j gem
MIT License
99 stars 80 forks source link

Bolt+routing #335

Closed ekampp closed 2 years ago

ekampp commented 4 years ago

Based on this, previous dicussion, this attempts to reimplement bolt+routing for causal cluster load balancing.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-3.8%) to 86.814% when pulling e1be7fa45fac12fa55c566d7afef4cfe838e6246 on systems-engineering:master into 4b649fca33a1b1dba8705e6f999764ad9fb4d76e on neo4jrb:master.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-3.8%) to 86.814% when pulling e1be7fa45fac12fa55c566d7afef4cfe838e6246 on systems-engineering:master into 4b649fca33a1b1dba8705e6f999764ad9fb4d76e on neo4jrb:master.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-3.8%) to 86.814% when pulling e1be7fa45fac12fa55c566d7afef4cfe838e6246 on systems-engineering:master into 4b649fca33a1b1dba8705e6f999764ad9fb4d76e on neo4jrb:master.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-3.8%) to 86.814% when pulling e1be7fa45fac12fa55c566d7afef4cfe838e6246 on systems-engineering:master into 4b649fca33a1b1dba8705e6f999764ad9fb4d76e on neo4jrb:master.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-3.8%) to 86.814% when pulling e1be7fa45fac12fa55c566d7afef4cfe838e6246 on systems-engineering:master into 4b649fca33a1b1dba8705e6f999764ad9fb4d76e on neo4jrb:master.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-3.8%) to 86.814% when pulling e1be7fa45fac12fa55c566d7afef4cfe838e6246 on systems-engineering:master into 4b649fca33a1b1dba8705e6f999764ad9fb4d76e on neo4jrb:master.

klobuczek commented 4 years ago

@ekampp this PR implements only the load balancing aspect of causal clustering. Full clustering cannot be implemented with an adapter and without changes to the current neo4jrb DSL and the client code. What is missing is handling bookmarks to ensure reading your own writes. With the current adapter approach, 1 transaction per query, this is not achievable. We intend to provide explicit session and transaction demarcation in neo4j-10.0.x the same way as in neo4j-ruby-driver. The bookmarks obtained from a session must be provided to the next session if a guarantee is needed that all transactions are routed to servers caught up with all transactions of the previous session.

ekampp commented 4 years ago

@klobuczek, thanks for the feedback!

I have also added this PR to neo4j it self for the session management.

When is 10.0.x expected to be launched, and how will that help this situation? I'm not sure I understand the jargon around transaction demarcation. Sorry.

Thanks, Emil