Node.js mysql modules - asynchronous IO or just threads
Checking out the following modules for connecting to Mysql db:
Do they actually use asynchronous IO or they just use green threads?
The first two are JS based. I believe they both use events but also take callbacks. The last one uses lib_eio to take a callback and fire it when the C++ method finishes firing.
Node, in JS land, doesn't have threads. Node runs in an event loop. That is why it is important for tasks that wait for responses or have latency (network calls, FS read/write, etc.) to be async.
These DB drivers would be next to useless if they weren't because they would block the execution thread until they got a response from mysql.