At the moment I'm using SQLite as a file-based IPC mechanism for a series of separate processes on Android (NDK side, all done in C++). Note by IPC here I mean really just variable sharing in an atomic way. I'm really just using it to store key/value pairs that any other application can read and modify.
I don't really need the relational aspect of SQLite and saying the C interface is unpleasant to use would be an understatement.
I've never used MongoDB before but I've always been intrigued by the positive feedback it gets. Plus I like what I'm reading about it, specifically that it has no schema and seems easier to use for the key/value pair case. However I also see that (correct me if I'm wrong) you can't really open a mongoDB database as a file like with SQLite, you have to use sockets, so I'm not sure what the performance or complexity impact of this is. I'm also not really sure if it requires a backend server process.
So before I invest a ton of time into this, I wanted to ask the SO community about how MongoDB would fit for my usage scenario and if there would be any benefits in replacing SQLite here. Huge pluses for me are making coding against MongoDB pleasant and more modern as well as allowing more flexible data storage. Performance is also a concern, which is why I brought up sockets. The MongoDB won't actually sit on a separate machine or anything, so I'm not sure if it's unnecessary overhead.
Aucun commentaire:
Enregistrer un commentaire