Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Multiple applications
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Karolis Petrauskas  
View profile  
 More options Nov 10 2012, 2:11 am
From: Karolis Petrauskas <k.petraus...@gmail.com>
Date: Sat, 10 Nov 2012 09:11:05 +0200
Local: Sat, Nov 10 2012 2:11 am
Subject: [erlang-questions] Multiple applications
Hello,

    I am building an Erlang based system that is composed of several
applications. In principle, the system consists of a main application
and a number of "plug in applications". The latter have modules
implementing behaviours defined by the main application. In this
particular case, should I have all the "plug in applications" as
library applications, and access them from the main application based
on some explicit configuration? Or should all the applications have
its own application modules starting own supervisors and then
registering self to the main application? The main thing confusing me
is the recommendation to have single supervision tree for the entire
system.

Best regards,
Karolis
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Garrett Smith  
View profile  
 More options Nov 10 2012, 11:16 am
From: Garrett Smith <g...@rre.tt>
Date: Sat, 10 Nov 2012 10:15:47 -0600
Local: Sat, Nov 10 2012 11:15 am
Subject: Re: [erlang-questions] Multiple applications
On Sat, Nov 10, 2012 at 1:11 AM, Karolis Petrauskas

<k.petraus...@gmail.com> wrote:
> Hello,

>     I am building an Erlang based system that is composed of several
> applications. In principle, the system consists of a main application
> and a number of "plug in applications". The latter have modules
> implementing behaviours defined by the main application. In this
> particular case, should I have all the "plug in applications" as
> library applications, and access them from the main application based
> on some explicit configuration? Or should all the applications have
> its own application modules starting own supervisors and then
> registering self to the main application? The main thing confusing me
> is the recommendation to have single supervision tree for the entire
> system.

There are good reasons for taking either approach, but if you're in
doubt, I'd suggest the second option: each plugin is an "active"
application (i.e. specifies a mod in the .app file) that registers
itself as needed with the main application.

The advantage to this approach is that you're further separating the
components of your system:

- The main application doesn't have to know about the plugins at
startup, which simplifies its configuration and removes the "wiring"
logic that it would otherwise need

- Plugins can be added and removed by adding and removing OTP
applications in the release (i.e. you use boot files to specify which
plugins are run for a given Erlang process)

The OTP application abstraction in Erlang is very powerful in this
respect, as long as you design your applications to be as independent
as possible from one another. You can add new functionality to a
system by the simple act of starting a new application!

Your only real design consideration then is how the plugin apps
register with the main application. This is a good spot for a
gen_event, or pub/sub broker model, where you use an intermediary
process to broker messages/requests between the main application and
the plugins.

Garrett
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Karolis Petrauskas  
View profile  
 More options Nov 10 2012, 5:02 pm
From: Karolis Petrauskas <k.petraus...@gmail.com>
Date: Sun, 11 Nov 2012 00:02:33 +0200
Local: Sat, Nov 10 2012 5:02 pm
Subject: Re: [erlang-questions] Multiple applications
Thank you for the comments. It sounds reasonable to go with active
applications. One aspect I forgot to mention is that the main
application should start its own processing only when all the required
plugins are ready. The plugin applications act as backend processors.
Maybe that could be solved in more abstract way: the main application
could be configured with names of processes (or incoming messages) to
wait for before processing is started. Although I am not sure if such
an approach is "erlangish", I was deep in java for last ten years.

Karolis

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

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Garrett Smith  
View profile  
 More options Nov 10 2012, 8:17 pm
From: Garrett Smith <g...@rre.tt>
Date: Sat, 10 Nov 2012 19:16:36 -0600
Local: Sat, Nov 10 2012 8:16 pm
Subject: Re: [erlang-questions] Multiple applications
What makes the plugins "pluggable"? If there's no uncertainly about
what might be registered, it might make more sense to define the
workers as children of a supervisor in your main app.

If you're breaking these into separate apps to manage complexity, then
I suspect you're looking at your option 1 -- library style apps that
are required by the main app.

If it's not know ahead of time what the plugins are, what is the
trigger for processing? Is it a certain number of plugins? A total
worker capacity?

On Sat, Nov 10, 2012 at 4:02 PM, Karolis Petrauskas

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

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Karolis Petrauskas  
View profile  
 More options Nov 11 2012, 2:01 am
From: Karolis Petrauskas <k.petraus...@gmail.com>
Date: Sun, 11 Nov 2012 09:00:52 +0200
Local: Sun, Nov 11 2012 2:00 am
Subject: Re: [erlang-questions] Multiple applications
    Your questions allow me to understand the problem better. Thanks
:) Maybe the terms "master application" and "plugin application" is
not totally appropriate. In java world it would be:
    master application = application server,
    plugin application = application (or user application).
The application server governs all the user applications, provides
some infrastructure and delegates some work to them. I would like to
have ability to add those applications freely, but once particular
user application added, the application server should proceed with its
own processing only when the added application is available.

    Maybe another way to solve this is to reverse the runtime
dependency: "the user applications take tasks from a queue provided by
the application server" instead of "the application server delegates
tasks to user applications". I need to think about that more. The
requirement for the solution to support cluster operation is not
making things clearer :)

Karolis

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

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Garrett Smith  
View profile  
 More options Nov 11 2012, 9:55 am
From: Garrett Smith <g...@rre.tt>
Date: Sun, 11 Nov 2012 08:54:44 -0600
Local: Sun, Nov 11 2012 9:54 am
Subject: Re: [erlang-questions] Multiple applications
Yeah, now the correct answer is very clear: it depends :)

Erlang applications will "turn on" a particular set of features. But
they're probably not the right abstraction for increasing "capacity".
E.g. you can't start multiple instances of the same application to do
more work. You can certainly add processes, managed under the auspices
of an application.

If you're willing to skim over some of the low-level technical areas,
I recommend reading the 0MQ "The Guide":

http://zguide.zeromq.org/page:all

There's obviously quite a bit specific to 0MQ, but that document (soon
to be a published book as I understand!) elaborates a way of thinking
about messaging patterns that might be very helpful in provoking
different questions and ideas for you.

Each of the messaging patterns presented in The Guide can be applied
quite easily within a single Erlang node -- it's all just message
passing.

And if you're so inclined, Erlang + 0MQ makes a very good platform for
distributed systems IMO (i.e. using these patterns across multiple
Erlang OS processes, without relying on distribute Erlang).

On Sun, Nov 11, 2012 at 1:00 AM, Karolis Petrauskas

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

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Karolis Petrauskas  
View profile  
 More options Nov 12 2012, 11:07 pm
From: Karolis Petrauskas <k.petraus...@gmail.com>
Date: Tue, 13 Nov 2012 06:07:16 +0200
Local: Mon, Nov 12 2012 11:07 pm
Subject: Re: [erlang-questions] Multiple applications
Thanks for the link, I will read that :)

Karolis

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

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic