How to embed mongodb on a nw.js ?

957 views
Skip to first unread message

henrique matias

unread,
Mar 18, 2015, 1:03:10 AM3/18/15
to nwjs-g...@googlegroups.com
Would it be possible to embed mongodb "transparently" as part of my nw.js application and have it running on windows and osx?

So it would start / stop together with the main process?

I believe the licence wouldn't be a problem since it's an application for "internal use" and won't be sold or public available.

and...@ctech.me

unread,
Mar 18, 2015, 8:58:09 AM3/18/15
to nwjs-g...@googlegroups.com
It would probably have some pretty high potential points where something could go wrong, but it is do-able. I wouldn't do it for a user that you can't be there to troubleshoot for when something goes awry.

I'm not sure how much data we're talking or how much support you intend to provide the users, but have you looked at something like NeDB?


Basically, the mongodb equivalent to sqlite. Pretty much the same API.

Thanish Muhammed

unread,
Mar 19, 2015, 2:10:40 AM3/19/15
to nwjs-g...@googlegroups.com

You can also try tingodb. It has the same api.


--
You received this message because you are subscribed to the Google Groups "nw.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nwjs-general...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

henrique matias

unread,
Mar 24, 2015, 4:25:09 PM3/24/15
to nwjs-g...@googlegroups.com
i tried tingodb but tingodb doesn't store the indexes on disk, so you need to do some initialization work which was too slow on my tests.

I used also leveldb with json engine, and end up with loads of work to make it work on OSX and Windows, so end up giving up on it.

So far the only database that is working fast and reliable with indexes for my data ( which has more than 100k entries ) is SQLite, which to be honest is saving my day.

The issue is that i would like to use some document based DB, that would make it easier to integrate with my code but i could not find anything that would perform and work as fast and smooth on OSX and Windows, hence why i was hoping to embed mongodb.

Anyway thanks for your input!

李铁

unread,
Mar 29, 2015, 7:02:40 AM3/29/15
to nwjs-g...@googlegroups.com
You can try nedb.

Nedb is embedded persistent database for Node.js, written in Javascript, with no dependency (except npm modules of course). You can think of it as a SQLite for Node.js projects, which can be used with a simple require statement. The API is a subset of MongoDB's. You can use it as a persistent or an in-memory only datastore.

在 2015年3月18日星期三 UTC+8下午1:03:10,henrique matias写道:
Reply all
Reply to author
Forward
0 new messages