GithubHelp home page GithubHelp logo

Comments (3)

mariuz avatar mariuz commented on June 2, 2024

I will take a look do you have a test case that you can send it to me ?

from node-firebird.

piotr-przebieracz avatar piotr-przebieracz commented on June 2, 2024

Hi!

First of all, I would like to apologise that I didn't write to you earlier.
As I said, this situation is not easy to reproduce, but I managed to prepare sample simulating this situation. I wrote shortest possible Node.js server updating some data in Firebird database and corresponding load test for this server. Whole sample is available as a gist here:
https://gist.github.com/piotr-przebieracz/f7949bfb89654213fa2a
After downloading my sample, just install npm packages and replace path to test database in server.js file. I ran load test on 3 machines - in some cases the error occurred right after first execution, sometimes - a little bit later.

It is also important that I used forked version of 'node-firebird' package (https://github.com/ela-compil/node-firebird). As you can see, the only change is default isolation level. Me and my colleagues needed NO WAIT behaviour in case of a situation when two or more simultaneous updates occur, because it was important for us to receive an error immediately without waiting.
The default behaviour (waiting for the other transaction to finish) resulted in very long response times when two or more users modified the same data.

from node-firebird.

petersirka avatar petersirka commented on June 2, 2024

You should use fb.attach() for each request. I added a connection pooling into new version, try it with new version v0.2.0:

A small modification:
https://www.online-clipboard.com/1413307914875304f8b589e205ebx28/

Everything works but server gets too many requests.

from node-firebird.

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.