neo4jrb / neo4j-core

A simple unified API that can access both the server and embedded Neo4j database. Used by the neo4j gem
MIT License
99 stars 80 forks source link

Make Bolt adaptor work with JRuby #300

Closed jgaskins closed 7 years ago

jgaskins commented 7 years ago

JRuby does not support BasicSocket#sendmsg (connecting via Bolt on JRuby crashed with a NotImplementedError), but it does support BasicSocket#send. send requires flags to be specified, but sendmsg defaults them to 0, so I just used that since we weren't overriding that default here anyway.

This all started as an experiment to see if JRuby would run Bolt faster than HTTP, but that's not the case, unfortunately. JRuby Bolt is indeed over 2.5x as fast as CRuby Bolt, but still lags behind JRuby HTTP and CRuby HTTP (which are actually pretty close to each other) by about 37%.

Tested with JRuby 9.1.12.0 on Java 8 on queries deserializing 18k nodes.

Pings: @cheerfulstoic @subvertallchris

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 73.68% when pulling 74082a1f8851889b81eb25488ab49be79f96700d on jgaskins:jruby-bolt into ef747869b9c259db816b655afec6f48e65720230 on neo4jrb:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 73.68% when pulling 74082a1f8851889b81eb25488ab49be79f96700d on jgaskins:jruby-bolt into ef747869b9c259db816b655afec6f48e65720230 on neo4jrb:master.

cheerfulstoic commented 7 years ago

Excellent, thank you!

cheerfulstoic commented 7 years ago

Released as 7.2.3!