Comments on: Bundling ErlyBank as an Application http://spawnlink.com/articles/bundling-erlybank-as-an-application/ Linking You to Erlang Sun, 22 May 2011 00:00:23 +0000 http://wordpress.org/?v=2.6.1 By: snaky http://spawnlink.com/articles/bundling-erlybank-as-an-application/#comment-8765 snaky Fri, 19 Jun 2009 09:11:51 +0000 http://spawnlink.com/?p=111#comment-8765 Is there a way to automatically generate the Application Resource file? What if some modules will be removed from a project and the resource file isn't correspondingly updated? It's rather inconvenient to write a list of all included modules manually. Is there a way to automatically generate the Application Resource file? What if some modules will be removed from a project and the resource file isn’t correspondingly updated? It’s rather inconvenient to write a list of all included modules manually.

]]>
By: Witold Baryluk http://spawnlink.com/articles/bundling-erlybank-as-an-application/#comment-722 Witold Baryluk Fri, 14 Nov 2008 16:58:37 +0000 http://spawnlink.com/?p=111#comment-722 Actully this should be: start(_Type, _StartArgs) -> eb_sup:start_link(). stop(_State) -> % where _State is return value of start, or M:prep_stop/1 if exists ok. This exactly the same. Additionaly stop/1 is called by application master AFTER the application was already stoped. maxP is deprecated, and is ignored. (it was maximal number of allowed processes). maxT is maximal time in ms that app is allowed to run. after it it will be terminated. There is also very important callback M:config_change/3 used in upgrades, but it is anothere story. Anyway nice article! Actully this should be:

start(_Type, _StartArgs) ->
eb_sup:start_link().

stop(_State) -> % where _State is return value of start, or M:prep_stop/1 if exists
ok.

This exactly the same. Additionaly stop/1 is called by application master AFTER the application was already stoped.

maxP is deprecated, and is ignored. (it was maximal number of allowed processes).

maxT is maximal time in ms that app is allowed to run. after it it will be terminated.

There is also very important callback M:config_change/3 used in upgrades, but it is anothere story.

Anyway nice article!

]]>
By: Doug http://spawnlink.com/articles/bundling-erlybank-as-an-application/#comment-166 Doug Wed, 01 Oct 2008 18:37:20 +0000 http://spawnlink.com/?p=111#comment-166 Do you know why it happens? When I tried to load the app, it threw an error complaining the sasl module is not loaded: 3> application:loaded_applications(). [{kernel,"ERTS CXC 138 10","2.12.4"}, {stdlib,"ERTS CXC 138 10","1.15.4"}] 4> application:load(erlybank). ok 5> application:loaded_applications(). [{kernel,"ERTS CXC 138 10","2.12.4"}, {erlybank,"ErlyBank system.","1.0"}, {stdlib,"ERTS CXC 138 10","1.15.4"}] 6> application:start(erlybank). {error,{not_started,sasl}} 7> application:start(erlybank). {error,{not_started,sasl}} And I tried to modified the erlybank.app to remove that sasl module this is what get 2> application:loaded_applications(). [{kernel,"ERTS CXC 138 10","2.12.4"}, {stdlib,"ERTS CXC 138 10","1.15.4"}] 3> application:load(erlybank). ok 4> application:loaded_applications(). [{kernel,"ERTS CXC 138 10","2.12.4"}, {erlybank,"ErlyBank system.","1.0"}, {stdlib,"ERTS CXC 138 10","1.15.4"}] 5> application:start(erlybank). {error,{bad_return,{{eb_app,start,[normal,[]]}, {'EXIT',{undef,[{eb_app,start,[normal,[]]}, {application_master,start_it_old,4}]}}}}} =INFO REPORT==== 1-Oct-2008::13:34:36 === application: erlybank exited: {bad_return, {{eb_app,start,[normal,[]]}, {'EXIT', {undef, [{eb_app,start,[normal,[]]}, {application_master,start_it_old,4}]}}}} type: temporary 6> Thanks Do you know why it happens?
When I tried to load the app, it threw an error complaining the sasl module is not loaded:

3> application:loaded_applications().
[{kernel,"ERTS CXC 138 10","2.12.4"},
{stdlib,"ERTS CXC 138 10","1.15.4"}]
4> application:load(erlybank).
ok
5> application:loaded_applications().
[{kernel,"ERTS CXC 138 10","2.12.4"},
{erlybank,"ErlyBank system.","1.0"},
{stdlib,"ERTS CXC 138 10","1.15.4"}]
6> application:start(erlybank).
{error,{not_started,sasl}}
7> application:start(erlybank).
{error,{not_started,sasl}}

And I tried to modified the erlybank.app to remove that sasl module this is what get

2> application:loaded_applications().
[{kernel,"ERTS CXC 138 10","2.12.4"},
{stdlib,"ERTS CXC 138 10","1.15.4"}]
3> application:load(erlybank).
ok
4> application:loaded_applications().
[{kernel,"ERTS CXC 138 10","2.12.4"},
{erlybank,"ErlyBank system.","1.0"},
{stdlib,"ERTS CXC 138 10","1.15.4"}]
5> application:start(erlybank).
{error,{bad_return,{{eb_app,start,[normal,[]]},
{’EXIT’,{undef,[{eb_app,start,[normal,[]]},
{application_master,start_it_old,4}]}}}}}

=INFO REPORT==== 1-Oct-2008::13:34:36 ===
application: erlybank
exited: {bad_return,
{{eb_app,start,[normal,[]]},
{’EXIT’,
{undef,
[{eb_app,start,[normal,[]]},
{application_master,start_it_old,4}]}}}}
type: temporary
6>

Thanks

]]>
By: Mitchell http://spawnlink.com/articles/bundling-erlybank-as-an-application/#comment-84 Mitchell Tue, 16 Sep 2008 15:44:11 +0000 http://spawnlink.com/?p=111#comment-84 Harish, I have another article coming on Wednesday and it has a ZIP file attached to it. If I have time I'll do the same with this one, but I just wanted to let you know that I have noticed that the number of source files is getting a bit large to keep pasting them into pages. :) Harish,

I have another article coming on Wednesday and it has a ZIP file attached to it. If I have time I’ll do the same with this one, but I just wanted to let you know that I have noticed that the number of source files is getting a bit large to keep pasting them into pages. :)

]]>
By: Harish Mallipeddi http://spawnlink.com/articles/bundling-erlybank-as-an-application/#comment-83 Harish Mallipeddi Tue, 16 Sep 2008 09:59:37 +0000 http://spawnlink.com/?p=111#comment-83 Excellent series Mitchell. Keep them coming! Just one suggestion - can you dump your code at github.com or just offer a zip file at the end of each article? Your examples can serve as templates for all my future OTP projects! Excellent series Mitchell. Keep them coming!

Just one suggestion - can you dump your code at github.com or just offer a zip file at the end of each article? Your examples can serve as templates for all my future OTP projects!

]]>
By: Erlang Info @ spawn_link - Simplish http://spawnlink.com/articles/bundling-erlybank-as-an-application/#comment-82 Erlang Info @ spawn_link - Simplish Tue, 16 Sep 2008 09:56:44 +0000 http://spawnlink.com/?p=111#comment-82 [...] running Simplish - but I was subscribed to the feed before I left. Mitchell’s post about grouping program parts together into single-management-point units with Erlang’s applicationĀ ... was enlightening, and like a lot I learn about Erlang, describes runtime features that certainly [...] [...] running Simplish - but I was subscribed to the feed before I left. Mitchell’s post about grouping program parts together into single-management-point units with Erlang’s applicationĀ … was enlightening, and like a lot I learn about Erlang, describes runtime features that certainly [...]

]]>