Search code examples
node.jsoracleknex.js

Request handling in node.js with IO from oracledb via knex.js


I was wondering: Node uses event loop architecture. I connect to my oracle RDBMS via knex and query the DB with each request. Since oracle doesn't have reactive drivers, can the event loop architecture handle a production scale amount of requests? In any case, whether yes or no, how is it different from reactive drivers like mongo offers?


Solution

  • The Node.js driver for Oracle Database is completely asynchronous/non-blocking. All of its async operations are done using Node.js' thread pool so as not to block the main thread. You might find this recent talk I did interesting (it's my latest attempt at explaining a lot of this stuff): Understanding Asynchronous Processing and Patterns in Node js.

    Also, I recently started a series on building a REST API with Node.js on Oracle Database. The part on Database Basics touches on some of this too.