I am newbie into javascript, but I wrote some microservice in node. It's receiving some tasks and computing stuff for them, which takes few seconds. What's surprising for me, it acts like mixing data from those requests. In lang which I daily use, each request is like 1 separated thread of app, so operations can't go wrong, it's impossible to lose some data. What I debbugged, looks that in javascript requests are not separating, so if I will send 2 requests, second by second, some process will start, but I will receive only 1 correct result, bcz 1st will be override by 2nd. Can I separate them? I run 1 instance of app on my server, unfortunatelly I don't use dynamic servers for each request. Thanks for help.
Aucun commentaire:
Enregistrer un commentaire