[erlang-questions] erlang/C embedded db suggestion
Sat Jun 8 21:22:57 CEST 2013
I am not sure if it is what you're looking for, but if you need an embedded
database for Erlang, I would suggest you this one:
EGTM is Erlang/OTP binding for FIS GT.M (http://en.wikipedia.org/wiki/GT.M)
implementation of the M-technology (http://en.wikipedia.org/wiki/MUMPS).
The version published on GitHub is purely NIF-based. You can configure it
so that it will start a few slave Erlang worker-nodes but due to Erlang RPC
performance penalty, the single-node NIF is much more faster if you use it
Also, GT.M itself has built-in multi-site (replication) support, with no
dependency on Erlang stuff.
Another nice thing is that you can crunch your data directly in the M
language if needed -- it can minimize the amount of NIF calls in some kinds
We are about to release a new EGTM version (we use it in production, but
simply haven't merged it to the public repo) which also supports an I/O
based data exchange between Erlang and M functions.
There is also IODB product which is an OOP extension of EGTM which allows
you to map complex Erlang structures to GT.M globals (trees). But I guess
that's not what you're looking for.
Feel free to contact me if interested in more details!
On Saturday, June 1, 2013 1:29:28 AM UTC+2, Radu Brumariu wrote:
> I have a project where an application reads bits from a database using a C
> library and makes some decisions based on the data available there. At the
> same time, the same database is periodically updated by an Erlang app.
> It is highly likely that both the C lib and the Erlang app would have the
> library open at the same time, however the C lib would be read only,
> whereas Erlang process would open it for write as well.
> Any suggestions on what the database might be ? Something like term
> storage ( bdb ) would work for my needs, but bdb cannot be opened in
> parallel. Same goes for LevelDB, KyotoCabinet. The only that I have found (
> so far ) is sqlite(but I don't need sql). I am thinking that an alternative
> would be to have a raw file mmap-ped by the C library, but I would much
> rather use something that has some primitives already built.
> Also, I am considering doing IPC via a unix/tcp socket with the Erlang
> process, but I'd rather use a db/file ( provides natural fallback if the
> process does not run, or other comm issues).
> For the time being, the Erlang app and the C lib would be on the same box.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions