Real databases on Legato / WP710x

Hi

I am thinking about adding an open source database to my Legato system. Maybe something like mondgoDB or a node js clone implementation.

Before actually doing anything - does anyone have any thoughts?
[ul]
potential issues on this platform?
better DB options?

[/ul]

One area I am pondering is where to physically store the data
[ul]
Internal FLASH - what’s wear levelling like? - what’s its life likely to be?
External USB mass storage - will this work on the current platform?
External MMC / SD mass storage - will this work on the current platform?

[/ul]

Thanks in advance

John

Hi John,

What sort of (and how much) data are you looking at storing in your database?

My gut feeling is that you’re going to run into file system issues when storing the data. There’s not a lot of flash onboard (and you don’t want to wear it out with lots of writes), and after my experiences using SD cards for logging bulk data I have doubts about the reliability of storing rapidly changing data on a SD card too.

Could you get away with SQLite? Small footprint, proper SQL and has integration into pretty much any usual language you’re likely to be programming in.

ciao, Dave

Hi Dave

Yes good question regarding mass storage - lets say for now (until we solve the mass storage issue) I have a big USB SSD attached or a least a few gig of USB FLASH drive.

From my tests on the RPi - I found node and a mongoDB javascript clone ran well.

But will the WP710x work as well as the RPi?
I quite like noSQL but is it really suited to embedded systems? anyone know of any pitfalls?

Cheers

John

My understanding on DBs like MongoDB is that they attain much of their thuroput by gobbling up a lot of RAM and basicly mirroring that to disk. MongoDB in paticualr’s default target is a 64-bit machine with many GBs of RAM. In fact they’ve activly discuraged use of the 32 bit server as it wouldn’t scale as well as the 64-bit one.

So, I don’t think you’ll get the perf you’re looking for out of MongoDB in an embedded context.

You might want to look at something like [url]http://unqlite.org/[/url] which provides a document style store like MongoDB, (and also a key/value store if needed,) but can be embedded right into your appliction, like SQLite, and sounds like it will work well on an embedded platform.

-Kelly

Hi Kelly

Good point - I think the issues with mongoDb would become an issue if the documents were very large >2GB

I’ve been playing with node on other embedded linux hardware - seems to work very well and I noticed that Gunter Oblitschnig was demoing V8 running on Legato at the developer day. Do you see any practical issues that would mean node was a bad choice?

Getting back to the nosql database thing and embedded I found that tingodb works pretty well on embedded Linux + node (a bit slow but sometimes it doesn’t matter) - I haven’t tested it properly but I’m fairly certain it doesn’t use large amounts of RAM

Cheers

John