[erlang-questions] Mnesia best practices

Edwin Fine erlang-questions_efine@REDACTED
Wed Sep 24 19:13:40 CEST 2008


Dan,

I shamelessly use techniques that I learn from reading the code for
ejabberd. Even if to some learned Erlangistas it may not be the *ne plus
ultra* of Erlang code, to me it's got a lot of things in it to which I say,
"I didn't know you could do *that*!". Sometimes I struggle to figure out how
to do something, being fairly new to Erlang/OTP myself, and I ask, WWJD
(What Would Jabber Do?) and more often than not, there is an answer. You
could do a lot worse than taking a look at its organization and techniques.
It helps that it's a stable, real-world application that's in widespread
production.

http://www.ejabberd.im/

Of course, ejabberd is not the only interesting Erlang application out there
from which to cherry-pick idioms and techniques, it's just the first one I
really looked into deeply. There are many others that are well done or
cleverly done (and sometimes both), like RabbitMQ.

Hope this helps.

Regards,
Edwin Fine

On Wed, Sep 24, 2008 at 10:56 AM, <Dana.RUBINO@REDACTED> wrote:

> Hi Mazen,
>
> Can you be more specific please? I have had a look at the OTP Design
> principles i.e. release handling as suggested.
>
> Although it mentions target systems and building a release (.rel which
> looks good) it doesn't specify how I might specify the working Mnesia
> instance which I also want starting?
>
> Any ideas?
>
> Thanks,
> Dan
>
> -----Original Message-----
> From: Mazen Harake [mailto:mazen@REDACTED]
> Sent: 24 September 2008 15:30
> To: RUBINO, Dana, GBM
> Cc: erlang-questions@REDACTED
> Subject: Re: [erlang-questions] Mnesia best practices
>
> Use targets systems that conform to OTP release handling and and this sort
> of things come to you for free... you don't need to start Mnesia from your
> application.
>
> /Mazen
>
> Dana.RUBINO@REDACTED wrote:
> > Hi all,
> >
> > Anyone know the prescribed way for ensuring an Mnesia DB is up and
> > running (if not then start it) when starting up an erlang application?
> >
> > I would ideally like a process which is in charge of starting Mnesia
> > and monitoring it to ensure it has not gone down?
> >
> > Should I just use a supervisor for this?
> >
> > Thanks,
> > Dan
> >
> > **********************************************************************
> > ************* The Royal Bank of Scotland plc. Registered in Scotland
> > No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
> > Authorised and regulated by the Financial Services Authority
> >
> > This e-mail message is confidential and for use by the addressee only.
> > If the message is received by anyone other than the addressee, please
> > return the message to the sender by replying to it and then delete the
> > message from your computer. Internet e-mails are not necessarily
> > secure. The Royal Bank of Scotland plc does not accept responsibility
> > for changes made to this message after it was sent.
> >
> > Whilst all reasonable care has been taken to avoid the transmission of
> > viruses, it is the responsibility of the recipient to ensure that the
> > onward transmission, opening or use of this message and any
> > attachments will not adversely affect its systems or data. No
> > responsibility is accepted by The Royal Bank of Scotland plc in this
> > regard and the recipient should carry out such virus and other checks
> > as it considers appropriate.
> > Visit our websites at:
> > www.rbs.com
> > www.rbs.com/gbm
> > www.rbsgc.com
> > **********************************************************************
> > *************
> >
> > ----------------------------------------------------------------------
> > --
> >
> > _______________________________________________
> > 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080924/bb888255/attachment.htm>


More information about the erlang-questions mailing list