
Ask HN: Writing a database with async i/o - lonesword
I recently came across libuv (http:&#x2F;&#x2F;libuv.org&#x2F;), the low level library that lets nodejs do its async magic. This got me thinking. I would like clarifications along these lines:<p>1. Nodejs has async i&#x2F;o calls. However if I&#x27;m calling APIs to a (remote) database the actual read&#x2F;write into the db will be synchronous but node does not have to wait for that. Its possible to make the db itself write to the disk in async maybe? Are there any databases that uses libuv for actual async i&#x2F;o?<p>2. Javascript is famously single threaded. I understand that the nodejs runtime need not be - I can fire up 4 instances if I have 4 cpu cores. But if I use libuv to write yet another web framework in a language that support threads, wouldn&#x27;t it have all the goodness of async i&#x2F;o AND multithreading? Does something like that already exist?<p>I had asked the same question on SO here: https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;48759697&#x2F;writing-a-database-with-async-i-o
======
sr7201
Provided a stub of an answer on SO. However, I've only really touched the tip
of the iceberg - there are entire books written on the subject.

