Reputation: 48620
Is it possible to use MongoDB without the database part? As really for my application what would be ideal is to just keep the database in memory, and not actually require a database server. The use case for this is to pretty much wrap a selector/query engine around a series of documents that only exist in memory temporarily - once the session is over, we can don't care for the documents anymore.
Thanks guys, the application is in Node.js. If MongoDB can't do this, do you have any recommendations?
Upvotes: 3
Views: 288
Reputation: 15757
You could try running MongoDB with the following option, which effectively stops it from flushing data to disk. Of course, if you don't have enough RAM, the OS may decide to do precisely that.
--syncdelay 0
Upvotes: 1
Reputation:
MongoDB without the database is nothing. What you want is Memcached or something built on top of Memcached...or you use MongoDB with a RAM disk as database directory. But as far as you gave us information: there is nothing in your app where you are using MongoDB specific functionality....the right tool for each task....appearantly you are using the wrong tool.
Upvotes: 0
Reputation: 26861
You could use Memcached.
Here is a side=-by-side comparison of the two
Upvotes: 2
Reputation: 41872
As far as I know that's not possible, but you could easily create a new collection per session and drop it when the session finishes.
Upvotes: 2