Skip to content
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

[Feature Request] A native Golang driver without C #64

Closed
hsluoyz opened this issue Aug 1, 2019 · 18 comments · Fixed by #95
Closed

[Feature Request] A native Golang driver without C #64

hsluoyz opened this issue Aug 1, 2019 · 18 comments · Fixed by #95
Assignees

Comments

@hsluoyz
Copy link

hsluoyz commented Aug 1, 2019

I saw all other drivers (Java, Python, .NET) are implemented purely in its language, except Go is a wrapper of C. But it causes difficult build and relies on cgo. So can we develop a purely Go native driver?

@technige
Copy link
Contributor

technige commented Aug 2, 2019

Thank you for your suggestion. We will consider it.

@mcolburn
Copy link

I also vote for this.

@burdiyan
Copy link

It would be of great help to have a native driver (effectively considering the fact that other languages are implemented natively). So +1.

@ghost
Copy link

ghost commented Sep 10, 2019

+1

2 similar comments
@youshy
Copy link

youshy commented Oct 31, 2019

+1

@DSchmidlin
Copy link

+1

@krocos
Copy link

krocos commented Nov 7, 2019

Any progress on this issue? It would be great to get positive developers answer like "alright guys it's almost ready" 🙄😁

@megakoresh
Copy link

This driver is currently fairly useless due to ridiculous number of issues with seabolt, as it requires more effort to build than writing actual code in the library consumer. I sincerely hope this feature request gets prioritized high.

Having external dependencies is counter to golang's conventions, and the dependencies themselves are have very unconventional linkage, preventing them from building anywhere but the particularly configured linux machines neo4j devs use. Or so it seems. At least it doesn't build on neither mac or windows, and following their instructions doesn't help.

In addition cross-compiling is a widely-used feature of golang that anything using this library wouldn't be able to take advantage of.

@technige
Copy link
Contributor

We have definitely heard the Go community's strong opinions on this, and do plan to re-approach the architecture of the Go Driver. As yet, I cannot give a timescale though, as this is a non-trivial piece of work.

@mvid
Copy link

mvid commented Jan 12, 2020

@technige I have been doing some work to integrate Neo4j into the standard go ecosystem, but this c library makes it pretty much a nonstarter. I took at look at gobolt, the connecting library between seabolt and this driver, and it seems like there is already solid encapsulation of logic, with the implementation limited to the Connection interface. Wouldn't the only necessary development be to implement an alternative to seaboltConnection, that doesn't use seabolt and just uses go directly? Am I missing something?

@2hdddg
Copy link
Contributor

2hdddg commented Apr 1, 2020

There will be a pure Go version of this driver, ongoing work on 1.8-dev branch. After that we will continue with a 4.0 driver to support new featues in ne4j server 4.0

@superbeeny
Copy link

Is there a timeline of when the 1.8 driver will be released?

@2hdddg 2hdddg linked a pull request May 7, 2020 that will close this issue
@2hdddg
Copy link
Contributor

2hdddg commented May 7, 2020

There is a beta release of a pure/native Go driver with this tag: v1.8.0-beta01

Would be very grateful of any testing and feedback on it!

There are no changes to the API but be aware that only bolt protocol version 3 is supported (neo4j server 3.5 and above).

@2hdddg 2hdddg self-assigned this May 7, 2020
@yasithA
Copy link

yasithA commented May 7, 2020

I'm trying out the beta version with the minimum viable snippet. Got the following panic at session.Run
TLS error: EOF
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x30 pc=0x5e0f08]

@2hdddg
Copy link
Contributor

2hdddg commented May 7, 2020

@yasithA what version of neo4j are you using?

@2hdddg
Copy link
Contributor

2hdddg commented May 7, 2020

@yasithA when connecting to a neo4j v4 server you need to disable encryption since the server no longer generates certificates automagically. So you need to tweak the snippet a bit, pass in thus func as last parameter to neo4j.NewDriver:
func(c *neo4j.Config) { c.Encrypted = false }
The snippet works unmodified for 3.5 databases and when I tried it unmodified on a 4.0 database it didn't panic, I just got the error. If session is touched after the error the application will panic, maybe you modified the snippet a bit?
Thanks for testing, I will update the snippet with this information!

@yasithA
Copy link

yasithA commented May 7, 2020

@2hdddg It works when c.Encrypted set to false. Thanks! :) neo4j version is 4.0.3.

@mcolburn
Copy link

mcolburn commented May 7, 2020

@2hdddg I am unable to test the new driver at this time because of other work commitments, but will in the future. Thank you for working on this!

@2hdddg 2hdddg closed this as completed May 19, 2020
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 a pull request may close this issue.