For one of our NodeJS projects we was looking for native in-proc database solution. Primary motivation was to keep code and data in same place on local file-system and absence of binary dependencies on anything besides NodeJS. Essential requirement was ability to handle more data that can fit memory with at least 1 to 100 ratio. Non essential but desired requirement was support of indexes with ability to use them for search queries. Our search leads us to Alfred database which seems to be exactly what we looking for. Other solutions that we tested were too simple and didn’t support indexes or fully work in memory.

So, we started from Alfred. It was promising at least on initial stage. Later, as our application grows it startĀ  to work with real data-sets and we got lot of issues with Alfred. Mostly it was data corruption, crashes, incorrect work of some essential operations, slow search and so on. We invest significant time in attempt to fix Alfred and at some moment we had an impression that we get it work. But the more we invest the more shortcomings we find and it was hard to change that. At some moment we decided to stop with Alfred.

With all the issues that we had with Alfred ourĀ confidence that pure JavaScript database can work for us significantly decrease. We start thinking about kind of dual approach where in worst case we can start using traditional solution with separate database server. At the moment we get very good experience working with MongoDB by building several very successful applications. So we decided to build our own NoSQL data-store engine which will be fully compatible on API and feature level with MongoDB.

MongoDB is feature rich database and full its replication is is very big task and more likely it is impossible using plain JavaScript. But based on our experience and well known 80-20 rule implementation of those 20% essential features is quite realistic task. And we did it! Currently our app implements dual approach and can be switched to MongoDB to TingoDB just with configuration option.