
EJDB: Embedded JSON Database for C/C++, .Net, NodeJS, Python, Lua, Java, Ruby - andrewstuart
http://ejdb.org/
======
andrewstuart
The disappointing thing about Tokyo Cabinet is that an empty database is six
megabytes in size. Not good for embedded systems where space it short.

~~~
skrebbel
I don't think this targets embedded systems. I believe the term "embedded" is
used to signal that the db is embedded inside your app, and not an external
server daemon that you need to talk to over some protocol.

------
pvnick
I love things like this. I generally work with JSON anyway when I'm doing one-
off things like cron jobs, and I usually just keep my data in JSON flat files,
so to have options like these really makes my life easier. Great job!

~~~
meowface
I fully agree; databases that store JSON (or something close to it) natively
are really useful when your application mostly inputs and outputs JSON.

I feel there are too many JSON-store databases, though. Competition is good
but it's been getting kind of ridiculous.

------
programminggeek
This looks awesome, but I find it odd how similar things on HN seem to pop up
in bunches. It's as if once one thing hits HN, a very similar thing is
automatically submitted and promoted to front page. It's a fairly strange
social dynamic to be sure.

~~~
melling
People want karma points so if they see something is of interest to the crowd,
you get more of it.

~~~
zerr
Why would anyone want karma? Really interesting.

~~~
eieio
Personally I'd like to have enough to be allowed to downvote. Not exactly my
top priority, but it'd be nice.

------
wslh
I think one of the key points is being able to run the "same" lib in different
programming languages. This is a model of thinking that need to be followed as
much as possible. If not, we are rounding in circles with zillions of
libraries created for Javascript that already are present in other programming
languages the energies end up unfocused. At the same time we need tools that
help us in this approach, like HaXe or SWIG.

One lib that I love is NetworkX, If you look at the source code it can be
easily ported to more programming languages. At the same time it is impressive
what Cocos2D achieved with their Javascript bindings and HTML5 native support.

------
dangayle
I was just asking the other day on #python if there was a nosql embedded DB
like sqlite. I will _definitely_ be checking this out. Might make things like
my one-off test web scraping much easier.

~~~
ddorian43
[http://www.reddit.com/r/Python/comments/1bap6u/embedded_docu...](http://www.reddit.com/r/Python/comments/1bap6u/embedded_document_store_eg_mongo_for_a_python/)

~~~
dangayle
Lots of good links in there. Thanks!

------
pixelmonkey
I discovered this a few weeks ago and realized it might be a great fit as a
data store for a 'local, self-contained' web application. That is, a web app
that is meant to run locally & in the browser (like IPython Notebook) but
needs a database for local persistence, without the complexity of using the
filesystem for storage. It's basically the benefits of SQLite with a simpler,
NoSQL interface/design.

------
albertzeyer
It is based on Tokyo Cabinet (which is under LGPL).

On the homepage of Tokyo Cabinet, it says:

"BTW, do you know Kyoto Cabinet? Actually, it is more powerful and convenient
library than Tokyo Cabinet. At this distance of time, Kyoto Cabinet surpasses
Tokyo Cabinet in every aspects. I strongly recommend you to use Kyoto
Cabinet."

I wonder why that isn't used. Maybe because Kyoto Cabinet is under GPL.

~~~
chmodd
Indeed, this is probably the reason. The company that developed ejdb
(Softmotions) apparently uses ejdb in their own proprietary software, and they
wouldn't be able to if it contained any GPL components.

------
tericho
This is awesome, I'm wondering how it performs for the average web app. Are
there benchmarks load tests anywhere?

~~~
pvnick
Just off my basic understanding of how the database works, I don't believe a
production web app would be a very appropriate use-case, since considering
it's an embeddable database you'll be bound by the slow filesystem.
Mysql/postgres or mongodb would be better options. This is more for self-
contained applications such as cron jobs or utilities.

~~~
andrewstuart
Really? I'd be interested to hear why it can't be used as a web server
database.

~~~
pvnick
Again, I must offer a disclaimer that I only read a fraction of the total
source code, but I would assume it would involve similar use-cases to sqlite
[1]. For example, IIRC, the Firefox web browser uses (used?) sqlite for
storage. However, reading over the list I just referenced, I must correct
myself and say that for _most_ websites, you would probably be ok in using it;
however, this seems to be an embeddable replacement for mongodb, which is
typically used for high-traffic environments anyway. I'm coming more from a
background of high-traffic sites with large datasets, so I typically rely upon
more tailored solutions, but I should be careful not to see everything through
my own narrow perspective!

[1]
[http://www.sqlite.org/whentouse.html](http://www.sqlite.org/whentouse.html)

------
arms
Very nice. I'm writing a Python app where this would come in very handy. Can't
wait to try it out.

------
zekenie
(Maybe silly) question: if we're talking about the node implementation, why
use this over mongodb?

~~~
cheald
Embeddable databases are nice and portable. It's like Sqlite versus Postgres -
the latter may be more robust, but requiring it as a dependency greatly
increases the effort needed to deploy your software. If an embedded database
can do the job, it may be worth it as a matter of convenience.

~~~
zekenie
Thanks!

------
munimkazia
This looks interesting.. I have used nedb on a small project, That is another
file based database, uses the same API as mongoDB. nedb is just an npm, so its
only nodejs supported right now, and the feature list of EJDB looks more
impressive anyway.

------
gaara87
Would be pretty cool if replication can be achieved

------
maratd
So you've got C/C++, .Net, NodeJS, Python, Lua, Java, and Ruby covered ... but
PHP is a no go?

Why not change it to we're on everything but PHP? Seems more succinct.

~~~
oinksoft
I'm not sure how to say this without being inflammatory ... there is a
universe outside of PHP, and PHP is not at the center of that universe.

~~~
maratd
> there is a universe outside of PHP, and PHP is not at the center of that
> universe.

There is only one universe and PHP is a part of it. A big part. That's the
reality.

Some of us have to work on multiple platforms with multiple languages and it's
truly a _disappointment_ when the authors clearly put in an effort to cater to
the community where multiple platform support is prioritized ... but then
exclude a platform due to personal bias.

That makes this project a no-go for me.

~~~
pvnick
I would say start treating the authors with the respect that they, as human
beings, deserve. I too would like PHP support, but, if it's not there, I can
still appreciate the _hours and hours_ of labor that go into the support they
do have. There's an expression "if you don't have anything nice/constructive
to say, then don't say it," and claiming that it's a "disappointment" that
they don't include your feature, and even going so far as to presume it's out
of personal bias, is just rude.

Edit: Besides, if you're running php, you're probably developing a web app, in
which case you should be using a database like mysql or mongodb anyway, not an
embeddable db.

