<div dir="ltr">Dan,<br><br>I shamelessly use techniques that I learn from reading the code for ejabberd. Even if to some learned Erlangistas it may not be the <i>ne plus ultra</i> 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 <i>that</i>!". 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.<br>
<br><a href="http://www.ejabberd.im/">http://www.ejabberd.im/</a><br><br>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.<br>
<br>Hope this helps.<br><br>Regards,<br>Edwin Fine<br><br><div class="gmail_quote">On Wed, Sep 24, 2008 at 10:56 AM,  <span dir="ltr"><<a href="mailto:Dana.RUBINO@rbs.com">Dana.RUBINO@rbs.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Mazen,<br>
<br>
Can you be more specific please? I have had a look at the OTP Design principles i.e. release handling as suggested.<br>
<br>
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?<br>
<br>
Any ideas?<br>
<br>
Thanks,<br>
Dan<br>
<div><div></div><div class="Wj3C7c"><br>
-----Original Message-----<br>
From: Mazen Harake [mailto:<a href="mailto:mazen@erlang-consulting.com">mazen@erlang-consulting.com</a>]<br>
Sent: 24 September 2008 15:30<br>
To: RUBINO, Dana, GBM<br>
Cc: <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
Subject: Re: [erlang-questions] Mnesia best practices<br>
<br>
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.<br>
<br>
/Mazen<br>
<br>
<a href="mailto:Dana.RUBINO@rbs.com">Dana.RUBINO@rbs.com</a> wrote:<br>
> Hi all,<br>
><br>
> Anyone know the prescribed way for ensuring an Mnesia DB is up and<br>
> running (if not then start it) when starting up an erlang application?<br>
><br>
> I would ideally like a process which is in charge of starting Mnesia<br>
> and monitoring it to ensure it has not gone down?<br>
><br>
> Should I just use a supervisor for this?<br>
><br>
> Thanks,<br>
> Dan<br>
><br>
> **********************************************************************<br>
> ************* The Royal Bank of Scotland plc. Registered in Scotland<br>
> No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.<br>
> Authorised and regulated by the Financial Services Authority<br>
><br>
> This e-mail message is confidential and for use by the addressee only.<br>
> If the message is received by anyone other than the addressee, please<br>
> return the message to the sender by replying to it and then delete the<br>
> message from your computer. Internet e-mails are not necessarily<br>
> secure. The Royal Bank of Scotland plc does not accept responsibility<br>
> for changes made to this message after it was sent.<br>
><br>
> Whilst all reasonable care has been taken to avoid the transmission of<br>
> viruses, it is the responsibility of the recipient to ensure that the<br>
> onward transmission, opening or use of this message and any<br>
> attachments will not adversely affect its systems or data. No<br>
> responsibility is accepted by The Royal Bank of Scotland plc in this<br>
> regard and the recipient should carry out such virus and other checks<br>
> as it considers appropriate.<br>
> Visit our websites at:<br>
> <a href="http://www.rbs.com" target="_blank">www.rbs.com</a><br>
> <a href="http://www.rbs.com/gbm" target="_blank">www.rbs.com/gbm</a><br>
> <a href="http://www.rbsgc.com" target="_blank">www.rbsgc.com</a><br>
> **********************************************************************<br>
> *************<br>
><br>
> ----------------------------------------------------------------------<br>
> --<br>
><br>
> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
<br>
</div></div></blockquote></div><br></div>