Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

build log

Eric Solender edited this page Jan 12, 2020 · 2 revisions

Init sequence (01/10/2020):

  • prior init sequence used a struct like the following to send details in
type InitMessage struct {
	clientName string
	authToken  map[string]interface{}
}
  • through comparing byte code from the ws I captured in the neo browser, I noticed v4 uses a map instead of a struct. So I converted it from using the above struct to using a map built with the following
var initMap map[string]interface{}
if user == "" {
	initMap = map[string]interface{}{
		"scheme": "none",
	}
} else {
	initMap = map[string]interface{}{
		"scheme":      "basic",
		"principal":   user,
		"credentials": password,
	}
}

initMap["user_agent"] = clientName
  • the key difference is that the user_agent key was a struct member field prior to this change. Now encoding this with the standard map encoding plus prepending the signature made the system able to handshake properly with neo4j v4.
  • through testing, this appears to be backwards compatible with at least neo4j v3. I have yet to test it with v2 and v1.

Decision for fundamental redesign (01/12/2020):

  • The driver written by john was a good start but the modern driver needs to be changed and needs new features added to it, similarly to how other drivers are written
  • For example, the "encoder" needs to be expanded. The internal message encoding can stay the same, but we need to wrap it in a "packer" like it is here
  • Also need to expand to support the additional features such as bookmarking, routing, and attaching additional metadata to said driver.
  • The java library is a good example of what this needs to become, messaging folder, packstream
  • This is certainly achievable, but will take much more time than originally thought.

Clone this wiki locally