Servoy and NoSQL?

Share business templates, ideas, experiences, etc with fellow Servoy developers here

Servoy and NoSQL?

Postby david » Sat Nov 19, 2011 10:03 am

Connected Servoy with MongoDB this evening and to my surprise it's a piece of cake:

http://www.servoymagazine.com/home/2011 ... ngodb.html

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.
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1724
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: Servoy and NoSQL?

Postby servoydevguy » Sat Nov 19, 2011 1:30 pm

Hello David,
We are currently using MongoDB in production. I created a MongoDB Servoy plugin available at ServoyForge: https://www.servoyforge.net/projects/mongodb

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.

-----------------------------------------------------------------------
Bobby Drake
Lead Software Engineer
Softwear, BV
Servoy 6.0.0
DB: External PostgreSQL 9.x (via TCP/IP)
OS: Mac 10.6, Windows 7
User avatar
servoydevguy
 
Posts: 26
Joined: Sat Jul 31, 2010 11:47 pm
Location: Wormerveer, NL

Re: Servoy and NoSQL?

Postby Hans Nieuwenhuis » Sat Nov 19, 2011 1:55 pm

What would be the reasons to move data from a rdbms to a nosql database ( like mongodb or Oracle Nosql) ?
Would you move only certain data or ?

Regards,
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: Servoy and NoSQL?

Postby servoydevguy » Sat Nov 19, 2011 4:44 pm

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.

-----------------------------------------------------------------------
Bobby Drake
Lead Software Engineer
Softwear, BV
Servoy 6.0.0
DB: External PostgreSQL 9.x (via TCP/IP)
OS: Mac 10.6, Windows 7
User avatar
servoydevguy
 
Posts: 26
Joined: Sat Jul 31, 2010 11:47 pm
Location: Wormerveer, NL

Re: Servoy and NoSQL?

Postby david » Sat Nov 19, 2011 10:59 pm

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 Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1724
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: Servoy and NoSQL?

Postby servoydevguy » Tue Nov 22, 2011 10:33 am

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.

-----------------------------------------------------------------------
Bobby Drake
Lead Software Engineer
Softwear, BV
Servoy 6.0.0
DB: External PostgreSQL 9.x (via TCP/IP)
OS: Mac 10.6, Windows 7
User avatar
servoydevguy
 
Posts: 26
Joined: Sat Jul 31, 2010 11:47 pm
Location: Wormerveer, NL

Re: Servoy and NoSQL?

Postby Westy » Sun Feb 17, 2013 12:01 am

Westy
 
Posts: 833
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Re: Servoy and NoSQL?

Postby jcarlos » Sun Feb 17, 2013 12:54 pm

What about Hadoop? Anyone into using Hadoop with Servoy?
jcarlos
 
Posts: 569
Joined: Thu May 04, 2006 8:55 pm
Location: Palo Alto, California USA


Return to Sharing Central

Who is online

Users browsing this forum: No registered users and 1 guest