do you use NoSQL databases?

i’ll read up on plugins. Thank you Norman.

[quote=32734:@scott boss]if you have spare time (hahahahahahaha) and would like to work on this, I could be easily convinced to help you. Im not an python expert but I know some.

Spare time ? is that the hours between midnight & 7am ?
Yeah… who needs sleep anyways :stuck_out_tongue:

[quote=32744:@Norman Palardy]Spare time ? is that the hours between midnight & 7am ?
Yeah… who needs sleep anyways :P[/quote]

sleep is overrated. :slight_smile:

If I didn’t know any better, I’d think you were a nocturnal coding monkey :wink:

Apparently, since PostgreSQL 9.1, you can read external databases, including NoSQL (check).

Since version 9.3, you can also write to these external databases (“Foreign Data Wrappers”).

A good solution to handle a NoSQL database from Xojo?’s_new_in_PostgreSQL_9.3#Writeable_Foreign_Tables

MongoDb is something I’ve looked at… The issue is that you’d have to clearly do a plug-in and wrap their “C” API.

I’ve not had time to investigate this, but I’ll say this…

This would help the WE edition of the product a lot. Given that “cloud” is something that is on everybody’s mind, having Xojo be delivered with MongoDb, or having a plug-in out there for MongoDb would make it an easier choice for folks building out WE apps.

Any reason to choose MongoDB over, say, CouchDb?

Pure curiosity - I don’t use either in anger.

Hi guys, very interesting post.

I’m currently exploring to insert data (JSON documents) from Xojo into Couchbase, all coming from a large transactional file that I’m parsing in Xojo. As I’ve never programmed a web application or server backend, I’m trying to build an easy prototype to see if it’s possible with my limited programming knowledge (limited as in to Xojo or more it’s predecessor a couple of years ago, REALbasic) to parse that data and push a lot of documents into Couchbase.

Can anyone here help me and explain how to connect to it? Couchbase lists down several SDK’s ( as Java, .Net, PHP, Ruby, C and Python. Also Node.js (as experimental) but I have no clue (nor experience) as which SDK I have to use or if this “connection” that I’m looking for is even existing.

Hope this makes sense in my laymen’s terms :wink:

Thanks in advance,


I’m reading the ‘Writing Real Studio Database Plug-Ins’ documentation, and having a difficult time getting started. The example shows sub-classing an existing database. How do I get started with a non-sql database?

With MongoDb, and I looked briefly into doing a plug-in around Mongo, you’d have to get the “C” libraries that are ported over. Meaning, the .NET ones clearly aren’t going to work.

I believe the approach would be to wrap that driver in a Xojo plug-in.

Gary, yes I understand that. It’s getting started with the plugin where I’m having problems. This is my first shot, and I seem to be going around in circles. So far I have a blank page… :slight_smile: Where do I go from here? i know this is very basic, but I just need a jump start.

Before going down the path of writing a database plugin, you might try to figure out if your favorite NoSQL database really matches that model or not. My thinking is “or not”.

From there, you might consider some other options rather than wrapping the platform C library in a plugin. One is to use declares into the platform C library. Another would be to use (or find) a server-side RESTful interface for your database, and call it through HTTP[Secure]Socket from your apps. From a debugging standpoint, that approach will save you weeks of work. Since you’ve got a client-server thing going, you shouldn’t pay a performance penalty that negates the debuggability advantage.

But back to database plugins… With a fairly standard SQL database and nicely working C client libraries, you could easily get bogged down in the nuances of matching Xojo’s Database model to your client libraries. There might be like 5 people who’ve done that at some point. As one of them, I can tell you, not fun, not cheap.

Hi Brad, thanks for your reply. You mention calling a RESTful interface through a HTTPS Socket.

Could you give a simple coding example as to how PUT a JSON to a database through a HTTPS Socket call?

Thanks in advance,


HTTP[Secure]Socket doesn’t have a built-in PUT method, but you could use SendRequest.

Might take a little extra legwork with the HTTP RFC to figure out the right data to send along. I know some of these RESTful API’s (not just databases) like to use PUT for complete correctness, but many will also stick with GET and POST for simplicity. If I had to make a middleware layer (e.g. with PHP), I’d stick with those too and invite all the ridicule people with too much time on their hands want to send my way ;-).

P.S. Even if I had to create some PHP server-side middleware for this, that’s how I’d go. Debugging and tuning plugins that use platform-native sockets is usually an adventure. Patching anything up to match the Xojo Database API also tends to be quite a task. I’m really happy that with the new SQLiteDatabase, they’re getting away from the old ideal model a bit.

Once again, could someone share an example of how to get started with the coding.

[quote=33704:@Robert Kamarowski]Once again, could someone share an example of how to get started with the coding.

If you’re talking plugin, I doubt that any of the few who has done this actually have code they can share.

I’m talking anything that will allow me to use a non sql database… :slight_smile:

[quote=33726:@Robert Kamarowski]I’m talking anything that will allow me to use a non sql database… :slight_smile:

Whatever route you take, you’ll be an original explorer. I don’t think anyone is withholding code just for fun :-).

I’m doing the same thing. When I have something to post I’ll post it with pleasure, though please don’t expect a shining example of how to code. I solve problems rather than write code, if you know what I mean.

The approach I’m taking is I’m writing some PHP middleware because of my specific circumstances (two different types of databases - CouchDB & MySQL) so my Xojo app will talk one “language” and offload the donkey work.