And it is really easy to code against. No automatic data binding of course but most of the time now we’re using table foundsets and queried datasets to code with anyways. A MongoDB cursor is just as easy to get and manipulate.
Anyone gone down this route? Any gotchas? I did note in the code comments that running all MongoDB code through the headless client plugin might be necessary. That way Servoy Server is the client to MongoDB and handles all connection pooling between the two. Not sure it’s needed though.
This plugin basically exposes the mongoDB java drivers to Servoy. So far, using MongoDB has been very successful for us. We plan to continue moving data to MongoDB that would have originally lived in Postgres.
Our reason was speed related. We needed to access certain data instantaneously and Mongo allowed us to do that. It’s also useful if you want to access/query your data in an object oriented way.
Ease of scalability was my initial interest. If several tables of a large solution have the potential to vastly overload an RDBMS then offloading those tables to NoSQL perked my curiosity. Session and the key/value data tables for our CMS is our current example.
Another: in the past we’ve offloaded large blobs to the file system instead of storing in the database because of the same issue – one huge and growing table of versioned files driving the resources needed for the entire RDBMS. After playing around with MongoDB some more, I’m liking how it handles large blobs as well. Might go back to storing files in a database.
End result – no matter how big things get and how many times you shard the database (up to 1,000 shards…really?!!), it’s the same front end code to retrieve data.
For some reason I had this idea that all this power would come with a significant pain-in-the-ass factor. Turns out it seems like MongoDB might be easier to code against than traditional “normalized” SQL databases. Simple javascript. And the flexible data structure stuff makes perfect sense in a lot of situations where I feel like I’m doing a lot of extra work to get around the fixed structures of SQL databases.
And if it is as fast as they say…bonus. Glad to hear this is real world experience with Servoy. Will check your plugin out.
David,
I definitely agree with all of your points as well. The flexibility of Mongo/NoSQL databases is something that I was never able to achieve with a traditional RDBMS.
I experiemented with creating a file store in Mongo and I was amazed at how easy it was to upload files to Mongo using the GridFS. The Java driver handles streaming the files to Mongo in chunks and then fires an event when the upload is complete. I included a GridFS object in the plugin I created.