Skip to content

Pure Go implementation#95

Merged
2hdddg merged 64 commits into
1.8from
1.8-dev
May 7, 2020
Merged

Pure Go implementation#95
2hdddg merged 64 commits into
1.8from
1.8-dev

Conversation

@2hdddg

@2hdddg 2hdddg commented May 7, 2020

Copy link
Copy Markdown
Contributor

Pure Go implementation of bolt/connection pool/routing without relying on gobolt+seabolt (no more cgo).

Intention is to be fully backwards compatible with 1.7 release.

Peter Wilhelmsson and others added 30 commits March 24, 2020 14:55
A pure Go packstream implementation in an internal package.

As part of work to make driver independent of gobolt+seabolt this patch
implements the binary serialization format used to communicate with
neo4j bolt server.

Note that this package isn't yet used by any previously existing production driver code.
Implements connection handshake and running a Cypher query with
auto-commit. The query returns a result with a very limited support for
data types. Only simple data types like string, int64 etc plus show
casing more complex data type in the form of a node.

The 1.7 API will be preserved. Interface definitions will be in
neo4j/api package and exported from neo4j. This is to make it possible
to use the interfaces from the internal packages without any circular
dependencies (the neo4j package will use the internal packages).
Ensuring that existing API will work with new low level connection
API.

Preserve existing implementation in separate folder (neo4jx) to be able
to move needed things into neo4j further on when they are needed.
Implement bolt transaction protocol and rewire the existing session, driver and
transaction API:s to use the Go native implementation.
Simple connection pool that can handle max pool size and acquisition
timeouts.

Could be blocking for a bit too long if it takes long time to connect,
it will block other threads from connecting to other servers in this
implementation. Better implementation next...

Does not handle connection timeouts.
Cleans up structure of hydration a bit.

Also clearifies parts of the protocol like the summary.
Brought in existing integration tests to validate more.
Some of these are failing, needs investigation on when nil pointers are
expected allowed.
Before Run on bolt3 connection, make sure that not in streaming state,
if it is consume all records+summary before continuing.
Connected transactions received through session to the session as well
as results directly received on session as the ones recieved on
transaction object.
More and simpler tests on bolt3 protocol level.
@2hdddg 2hdddg marked this pull request as ready for review May 7, 2020 06:07
@2hdddg 2hdddg merged commit 7897605 into 1.8 May 7, 2020
@2hdddg 2hdddg deleted the 1.8-dev branch August 5, 2020 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Any plan to implement pure go driver? [Feature Request] A native Golang driver without C

1 participant