Tuesday, January 04, 2011

This time I will write about node.js (http://www.nodejs.org) a fascinating new framework for working all sorts of network programs in an event. In addition it is blazingly fast, use V8 from Google, and uses javascript for development. All this combined with its simplicity makes it one of the most powerful technologies around. That is way by looking at it I though about a thing: Can we build some sort of very fast, scalable and robuts database around it? Moreover I would like to be able to use the database in two different manners. Either as a separate process by just invoking node db.js on the shell and then contecting to it in a server manner, or as a module.
In both cases I think it will be best to place the database in the memmory as much as possible and only read and write files rarely. Thus we will be able to speed up. The questions is what do we do with writes to the database? If we cache the writes and do not write them immediately data can be lost due to power outage or memmory corruption. Second good questions is about data performance in terms of memmory when the data grows? Imagine facebook using this database? Should it be optimal in all casess or should it be configurable so that it can adapt to the context, or maybe both by adapting automatically. Performance issues in terms of speed are generaly due to file I/O, thus by minimizing them or doing them in parallel they can be speed up-ed. I will think more about it. It is a funny idea. In addition I will make it open source, my first true open source project.

No comments: