[erlang-questions] How to use Mnesia Database from C/C++/Java ?

Amritpal Singh amritpal.singh@REDACTED
Tue Jan 22 10:30:56 CET 2008


Dear All,

Thanks a lot for sharing your valuable inputs, would decide on this further
and discuss with you all.

Regards,
Amritpal Singh

-----Original Message-----
From: erlang-questions-bounces@REDACTED
[mailto:erlang-questions-bounces@REDACTED] On Behalf Of Niclas Eklund
Sent: 22 January 2008 14:33
To: Scott Lystig Fritchie
Cc: erlang-questions@REDACTED
Subject: Re: [erlang-questions] How to use Mnesia Database from C/C++/Java ?


Hello!

Yes, Mnesia Session is no longer supported (R12B). Since Mnesia Session
was based on dirty operations, you're better of defining an API that maps
to the data model. A step by step example you can find here:

http://www.erlang.org/doc/apps/orber/ch_idl_to_erlang_mapping.html#6

Or you can use Jinterface and/or Erl_interface, but CORBA makes it easy to
hook in another backend due to the number of available language bindings:

http://www.puder.org/corba/matrix/

As mentioned there are more alternatives (HTTP, SNMP etc), which is why
it's hard to tell which solution would be the best choice for you.

/Niclas

On Mon, 21 Jan 2008, Scott Lystig Fritchie wrote:

> Søren Hilmer <sh@REDACTED> wrote:
>
> sh> There is/used to be, something called Mnesia Session for doing
> sh> exactly this.
>
> I think it's been deprecated.
>
> The bad news Amritpal will have to implement an interface from scrach.
> The good news is that it isn't difficult, and there are plenty of
> protocols to choose from.  Mnesia Session used CORBA, which I wouldn't
> recommend.  You could do also the same structured-data things as the old
> Mnesia Session CORBA via the Sun RPC library that's in Jungerl.
>
> Using a simple/RESTful GET/POST/DELETE interface using HTTP is quite
> simple.  Using SOAP wouldn't be much harder, though why you'd want to
> get XML involved is an excellent question.  Also, I've seen least one
> "memcached" server implementation in Erlang (I forget the author's name
> but not the language: Japanese).
>
> Even easier would be to have your C code use the Erlang term format (see
>
http://www.erlang.org/doc/apps/erl_interface/part_erl_interface_frame.html).
> At my current employer, the whole Erlang "thing" was new enough that the
> client team didn't want to use an Erlang-specific wire format, in the
> event the Erlang experiment failed.  So we rolled our own little text,
> TCP-based protocol.  {shrug}
>
> I don't know if this list posting contains anything new, but if it's
> helpful, great.  http://www.nabble.com/Mnesia-td10106072.html
>
> -Scott
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



_______________________________________________
erlang-questions mailing list
erlang-questions@REDACTED
http://www.erlang.org/mailman/listinfo/erlang-questions



This message and its attachments contain confidential information and may also contain legally privileged information. This message is intended solely for the named addressee. If you are not the addressee indicated in this message (or authorized to receive for addressee), you may not copy or deliver any part of this message or its attachments to anyone or use any part of this message or  its attachments. Rather, you should permanently delete this message and its attachments (and all copies) from your system and kindly notify the sender by reply e-mail. Any content of this message and its attachments that does not relate to the official business of Cellebrum.com Pvt Ltd or its affiliates and/or subsidiaries must be taken not to have been sent or endorsed by any of them. Opinions and information in this email that do not relate to the official business of Cellebrum.com Pvt Ltd, shall be understood as neither given nor endorsed by Cellebrum.com Pvt Ltd. Any action/proceeding/opportunity upon the contents of this email taken by not intended addressee shall attract liabilities both criminal and civil against such addressee.

Email communications are not private and no warranty is made that e-mail communications are timely, secure or free from computer virus or other defect.



More information about the erlang-questions mailing list