-
Notifications
You must be signed in to change notification settings - Fork 55
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
Support for streaming in Neo4j 2.0? #22
Comments
No current plans, but it would be nice to have. Any thoughts on the best way to implement? If you have a client able to fund development, I currently do have bandwidth to work on it. But it's not a personal priority at the moment. |
Looks like there isn't much magic to it.
Basically this sets the Since I only use the Cypher interface, I wrote a basic client using |
It would probably help if the JSON parser were "streaming" capable also, but I think the results actually need to be in a different format to be able to take real advantage of that, maybe. (the ability to marshall each data record as they come in, and call a callback, or something) |
Agree, obviously |
Making a cypher extension that does that actually doesn't seem like a hard problem... hmm. brb. |
Most likely it is in fact mostly the JSON parsing that is making |
Currently there is no way to tell |
New underlying HTTP client
In Neo4j 2.0.0-M03 this causes some behavior changes in the transactional endpoint, inducing test failure. Not sure how this will effect 2.0.0-M05. Will investigate that once #26 is resolved. |
M03 may have a streaming bug--there was one in 1.9.2 as well. Check to see if it is fixed in M05 before troubleshooting, I think. Also you should add:
|
Added user agent by default in #29. So now we want to add the streaming header to the existing
|
Batched Cypher operations return a different data format when streaming is set: http://docs.neo4j.org/chunked/2.0.0-M05/rest-api-batch-ops.html#rest-api-execute-multiple-operations-in-batch-streaming It is awkward to handle two different result formats. Is there a use case where it is desirable to execute batch operations without streaming? |
I would say there's no use case for not streaming. I'd be curious to know how much faster streaming is. |
I did a few quick tests before and found that streaming is slightly (1 - 2% on my configuration) slower if you are returning a very small number of results. However, the speedup when returning larger sets and overall reduced CPU is always worth it in my opinion so I've turned it on for all of my queries. |
Made some improvements to the node chain tx benchmark, so it returns more data than before. Not seeing significant difference with streaming. WITHOUT streaming:
With streaming:
Each benchmarks was run with a freshly-created Neo4j database. |
Fixed a bug in previous benchmark code. New results are similarly inconclusive. WITHOUT streaming:
With streaming:
|
interesting gap in the middle one. |
Which benchmark is this? Are you testing neoism or just Neo4j directly? |
This is Neoism. Running |
Do you have plans to support the new streaming interface for the REST API?
http://docs.neo4j.org/chunked/snapshot/rest-api-streaming.html
The text was updated successfully, but these errors were encountered: