GithubHelp home page GithubHelp logo

Comments (6)

dominique-vassard avatar dominique-vassard commented on June 28, 2024 1

No problem.

I'll be off for 1.5 week at least, so don't expect a PR soon :)

from bolt_sips.

dominique-vassard avatar dominique-vassard commented on June 28, 2024 1

done :)

from bolt_sips.

dominique-vassard avatar dominique-vassard commented on June 28, 2024

Regarding conn and bolt_version.
Touching conn appears to be a bad idea as it implies massive changes for the least.
Storing it at a lower level (in the DBConnection state) seems a better idea, it's more focused and it allows to access this value in the dbconnection callbacks such as handle_begin, handle_rollback, etc. Which is pretty nice as Bolt V3 introduces special message for transaction (BEGIN, COMMIT, ROLLBACK) and invalidates the usage of "BEGIN/COMMIT/ROLLBACK" in cypher queries.

from bolt_sips.

florinpatrascu avatar florinpatrascu commented on June 28, 2024

Storing it at a lower level (in the DBConnection state)

I thought about this too, but then for the bolt+routing we'll first have to connect before starting a pool of connections, check the server version and decide the routing strategy only after we have the server version. Storing it in the DBC state is probably not the ideal way, when recalculating the routes?! Not sure yet.

from bolt_sips.

dominique-vassard avatar dominique-vassard commented on June 28, 2024

I don't know, I didn't look deep enough in bolt+routing to understand exactly how it works.
but the state which I update is one used in Bolt.Sips.Protocol then it's not the one where pool is stored.
In fact there was only sock in it, now it contains %ConnData{sock: sock, bolt_version: 1}. so I imagine that adding a routes key is manageable.

I'm not 100% sure but I don't think there will be problem as only one connection is made and the first message exchanged with the server is the handshake which contained its preferred bolt version. After that, messing with the routes won't change the bolt version.

from bolt_sips.

florinpatrascu avatar florinpatrascu commented on June 28, 2024

oh I misunderstood what you meant by DBConnection state, sorry 👍

from bolt_sips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.