Coder Social home page Coder Social logo

Comments (13)

jeremyis avatar jeremyis commented on July 26, 2024

Good to know - not sure if I can think of a reason I'd use it now!

On Sun, Jan 29, 2012 at 2:34 PM, Aseem Kishore
[email protected]
wrote:

From Neo4j 1.6's changelog:

o Added request timeout, controlled with org.neo4j.server.webserver.limit.executiontime (disabled by default). Request header (max-execution-time) can shorten it if specified.

Might be nice to add support into our library to specify this on a request basis. We probably won't make use of it yet though, so chime in if you think you might. (And pull requests always welcome. =D)


Reply to this email directly or view it on GitHub:
#13

from node-neo4j.

lookfirst avatar lookfirst commented on July 26, 2024

I'd like to se this implemented. Even just allowing me to pass the request.timeout setting into the GraphDatabase constructor would be helpful.

from node-neo4j.

freeeve avatar freeeve commented on July 26, 2024

node-neo4j doesn't call any constructors since it's using REST. I'm curious whether the request header actually works--hadn't heard of it until now. I think I'll try it out real quick.

from node-neo4j.

lookfirst avatar lookfirst commented on July 26, 2024

@wfreeman Sorry, I don't understand your response, maybe I wasn't clear.

https://github.com/mikeal/request#requestoptions-callback

timeout - Integer containing the number of milliseconds to wait for a request to respond before aborting the request

Thus, I'd like...

exports.neo = neo = new neo4j.GraphDatabase(url: 'http://boo/', timeout: 10000)

Which would pass the timeout property to the underlying request

from node-neo4j.

freeeve avatar freeeve commented on July 26, 2024

Sorry, I thought you were talking about the server-side constructor, which didn't make sense. You're saying you'd like the client side request to timeout even if the server keeps crunching?

from node-neo4j.

lookfirst avatar lookfirst commented on July 26, 2024

Yes. In our case, we have a limit for the length we are willing to wait for Neo to respond. Right now, it is great that it is so fast, but if there is ever a hiccup in things and Neo locks up, we just want to kill the connection after a timeout. The reason is that we aren't always 100% dependent on the data from Neo. Our app keeps on working, it just has less useful information in the response. When running on Heroku, we have to service requests as quickly as possible or we get the dreaded H12 errors. So, having a solution to cut Neo off at the knees when it isn't behaving properly would be nice. Also, if the code is allowing one to pass in arguments to request, might as well allow them all as it is impossible to predict what users will want in the future (such as this requirement).

from node-neo4j.

aseemk avatar aseemk commented on July 26, 2024

I'm doing some issue cleanup, and haven't heard any more requests for this in a long time, so going ahead and closing this as "won't implement". Feel free to speak up if you disagree!

from node-neo4j.

lookfirst avatar lookfirst commented on July 26, 2024

Not having requests doesn't mean that it shouldn't be implemented.

from node-neo4j.

aseemk avatar aseemk commented on July 26, 2024

Sorry @lookfirst, missed your response. Okay, reopening then. This is easy to add; I'll try to include it in my v2 work in pull #145.

from node-neo4j.

aseemk avatar aseemk commented on July 26, 2024

I'm curious though: do you still want a client-side timeout if we can specify a server-side one? The server-side one will give you a guarantee that the db state didn't change, and you'll get back Neo's proper GuardTimeoutException. If we do a client-side one, it'll just look like an aborted request.

from node-neo4j.

aseemk avatar aseemk commented on July 26, 2024

I suppose the flip-side argument is that you can specify the server-side timeout in the Neo4j configs (as we do and as is recommended, maybe even the default), so perhaps the option is more useful for a client-side timeout. I'm not sure.

from node-neo4j.

lookfirst avatar lookfirst commented on July 26, 2024

@aseemk I haven't used this project in ages. I've offloaded my opinions at this point. Sorry. =(

from node-neo4j.

aseemk avatar aseemk commented on July 26, 2024

As noted in issue #177, it's now possible to achieve this in node-neo4j v2 since you can specify custom headers. =)

This issue will close the moment the v2 branch is merged to master, but you can use it today:

Issue: #143 / PR: #145
Docs: https://github.com/thingdom/node-neo4j/tree/v2#readme

from node-neo4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.