Erlang/OTP Forums

Author Message

<  Open Telecom Platform (OTP)  ~  OTP application with mnesia?

ea6611
Posted: Fri Apr 30, 2010 9:25 am Reply with quote
User Joined: 30 Apr 2010 Posts: 5006
Hi,
I'm working with transforming an existing pure-erlang application into an OTP based application, and I nedd some help with the database.
As I know Mnesia is itself an OTP app so I assume I dont have to create a supervisor for it. So what is the most suitable way to integrate Mnesia in the OTP app.

Thanks,
ely
View user's profile Send private message
Michal Ptaszek
Posted: Fri Apr 30, 2010 10:56 am Reply with quote
User Joined: 01 May 2008 Posts: 35 Location: Krakow
If your application has Mnesia in its dependency list, put it in the applications section in your .app file:

Code:

(...)
{applications, [kernel, stdlib, mnesia]},
(...)


Moreover, remember to put put Mnesia in .rel file as well:

Code:

{release, {RelName, Vsn}, {erts, EVsn}, [
(...)
    {mnesia, "MnesiaVsn"},
(...)
]}.


For more help on how to build your system obeying OTP rules, look at http://www.erlang.org/doc/design_principles/des_princ.html (and referenced modules, like applications and releases).
View user's profile Send private message
ea6611
Posted: Fri Apr 30, 2010 11:13 am Reply with quote
User Joined: 30 Apr 2010 Posts: 5006
Thank you Michal.
And I assume it is the same procedure with Inets.
View user's profile Send private message
Michal Ptaszek
Posted: Fri Apr 30, 2010 11:53 am Reply with quote
User Joined: 01 May 2008 Posts: 35 Location: Krakow
Yes, this procedure should be performed for every application in your release.

However, remember to avoid using some commands in the code (such as application:start(AppName) or application:set_env(AppName, Key, Val)) since the applications will be automatically started and configured by Erlang's internal processes (according to your .rel, .app (+ .boot which will be generated basing on those two) and sys.config files).
View user's profile Send private message
nike air max
Posted: Thu Jan 05, 2012 1:55 am Reply with quote
Guest
air max pas cher there can embody totally kinds of Nike footwear what comes. absolutely cost recognised how the principal shoppers from the marketplace berth is female.
wuji
Posted: Mon Aug 27, 2012 7:23 am Reply with quote
User Joined: 10 Aug 2012 Posts: 654
detonate it successfully aboard the plane.Officials say al-Asiri also designed designed authentic jordans designed the bombs hidden in printers that were shipped from
to Chicago. The bombs were intercepted in Dubai and the the real jordans the U.K. after they'd been placed aboard cargo planes.In a
intelligence bulletin issued overnight, the FBI and the Department of of cheap polo ralph lauren of Homeland Security said the Yemen group "intends to
plots along multiple fronts, including renewed efforts to target Western Western [h4]imitation designer *beep*[/h4] Western aviation.""It doesn't take a great number of people to
the kind of attack that we had on September 11," 11," [h2]cheap designer *beep*[/h2] 11," said Richard Clarke, an ABC News consultant and former
House counterterrorism official. "That was less than two dozen people people [h2]cheap polo ralph lauren[/h2] people and it's clear that they have that number available
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum