3 ms·
Think before you Nodejs.
by fiatjaf 10y ago
Think before you Nodejs.
- mafro 10y agoPlease elaborate. This comment provides little to the discussion.
- ionwake 10y agoHe won't, because he clearly hasn't worked in the field.
- beached_whale 10y agoNot nodejs, but I am in the process of tracking down and event loop loop (e.g. emit( event_id ) somewhere in the path of an event lisener of that name). I assume this can happen within node too. The stack trace is amazing to see.
- debacle 10y agoWhat tool are you using that allows you to see the stack trace on async events? That seems like a good debugger.
- beached_whale 10y agoThe code is based on boost asio, so the io_service is on the same thread as your code if you only start 1. Then after that I am in gdb/ldb. Asio's io_service handles the async calls portion and dispatches to my callback. From there on it is no longer necessarily async. The fun is that I have a higher level event handler sitting above this to register/unregister listeners, like one would in node. If one of those listeners happens to emit a message to what is is also listening for, boom. long store short, it's not the async code per say, but after that.
- fiatjaf 10y agoYes, it is.
- PascalW 10y agoThink before you anything.
- pbreit 10y agoI'm guessing the reference is to Mongo being coupled with Node (eg, MEAN). If you're gonna go MEAN, skip the A and swap Postgres for M.