neo4j-php / neo4j-php-client

Php client and driver for neo4j database
https://neo4j.com/developer/php/
MIT License
164 stars 41 forks source link

Close or disconnect connection #236

Open tomswinkels opened 1 month ago

tomswinkels commented 1 month ago

Hi,

Is there an option to close the connection?

Like $client->disconnect(); ?

In the bolt client, there is an option for it -> https://github.com/neo4j-php/neo4j-php-client/blob/c91a479a10f0d955eeab28618547a2373119ff99/src/Bolt/Connection.php#L45

transistive commented 1 month ago

Hello @tomswinkels,

Thank you for the question. @exaby73 and I have been discussing this very heavily and are busy implementing it properly. He is sick today, but we hope to circle back to this on Friday!

tomswinkels commented 3 weeks ago

Any update @transistive and @exaby73 ?

transistive commented 3 weeks ago

Hello @tomswinkels,

We have thoroughly discussed this as the connection logic is quite complicated.

In more general terms these are some relevant factors:

A long story short: we ended up in a long theoretical discussion of how this disconnecting of the connections would even be needed.

It seems like a valuable learning opportunity for all of us to see how this need arose, because under the current architecture exposing a single connection in the client, driver or session object is simply impossible.

I'll ping you in the internal slack to discuss further.