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
Scoped group leaders
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
  16 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
 
Yurii Rashkovskii  
View profile  
 More options Jul 2 2011, 8:38 pm
From: Yurii Rashkovskii <yra...@gmail.com>
Date: Sat, 2 Jul 2011 17:38:59 -0700
Local: Sat, Jul 2 2011 8:38 pm
Subject: [erlang-questions] Scoped group leaders
Hi,

I had an idea to play with this long weekend and I want to share some
results and get some feedback.

Basically, I was wondering whether it will be feasible to extend the
concept of group leaders beyond I/O so that you can build your own
primitives around this construct of inherited group leaders. It seemed
to me that tasks like implicit configuration, security groups and such
can benefit from having a more generalized group leadership mechanism.

In the last two days I wrote a quick-n-dirty proof of concept
implementation (https://github.com/spawngrid/otp/tree/group_leader_scope),
it's pretty rough but seems to work. I also wrote an early draft of an
EEP for this feature
(https://github.com/spawngrid/eep/blob/scoped-group-leaders/eeps/eep-s...).

The EEP has some examples, and you can play with that PoC
implementation (group_leader_scope branch). It's not ready for the
prime time, though — it lacks automated tests and the performance
implications have not yet been measured (although this should be fixed
soon). No optimizations were considered at this moment.

The EEP draft itself has not been sent to EEP editors as I plan to
elaborate on motivations and possibly add more examples.

Either way, please let me know if this is of any interest to anybody
and if you have any thoughts about it.

Have a nice weekend,
Yurii.
_______________________________________________
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.
Frédéric Trottier-Hébert  
View profile  
 More options Jul 4 2011, 10:19 am
From: Frédéric Trottier-Hébert <fred.heb...@erlang-solutions.com>
Date: Mon, 4 Jul 2011 10:19:22 -0400
Local: Mon, Jul 4 2011 10:19 am
Subject: Re: [erlang-questions] Scoped group leaders
I agree this might be quite useful. To me one of the interesting points has to be the possibility to write your own protocols similar to the IO one. I could see something like a web server or any other resource handler of the kind allowing a bunch of workers to pipe their output straight out to some socket, file descriptor or whatever.

The abstractions put in place in front of the IO server could be used across other resources with potentially different semantics (and thus requiring a different protocol). This could be a nice step towards that.

--
Fred Hébert
http://www.erlang-solutions.com

On 2011-07-04, at 10:15 AM, Eric Merritt wrote:

_______________________________________________
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.
Eric Merritt  
View profile  
 More options Jul 4 2011, 10:15 am
From: Eric Merritt <ericbmerr...@gmail.com>
Date: Mon, 4 Jul 2011 09:15:42 -0500
Local: Mon, Jul 4 2011 10:15 am
Subject: Re: [erlang-questions] Scoped group leaders
I can actually see a ton of uses for this. Not the least of which is
security, I just did a deep security piece in an erlang app, and it
turned out well, but I could see where something like this would have
made it much more elegant. The only thing that would concern me (from
looking at your implementation) is how much over head is added to
process creation. I think thats probably the main unknown, there are
probably some other things as well.

Just out of curiosity does a group leader go away when a group dies?

_______________________________________________
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.
Ulf Wiger  
View profile  
 More options Jul 4 2011, 11:15 am
From: Ulf Wiger <ulf.wi...@erlang-solutions.com>
Date: Mon, 4 Jul 2011 17:15:33 +0200
Local: Mon, Jul 4 2011 11:15 am
Subject: Re: [erlang-questions] Scoped group leaders

On 4 Jul 2011, at 16:15, Eric Merritt wrote:

> I can actually see a ton of uses for this. Not the least of which is
> security, I just did a deep security piece in an erlang app, and it
> turned out well, but I could see where something like this would have
> made it much more elegant

How, exactly?

The things that are difficult to do today, in terms of security in Erlang, is to *enforce* security in a way that cannot be subverted.

Group leaders are natural for IO, since IO necessarily involves sending a message to some entity. Some other things are overloaded - e.g. the application controller using the group leader to find out which application a process belongs to. That is a clear case where I think this would be useful: an "application group leader". But for security, I don't see it solving any of the problems I consider difficult - perhaps this is my failing: after having implemented reasonably transparent security in ErlHive, I get all kinds of associations to nasty problems that wouldn't be helped by this suggestion. But perhaps you are viewing it from a different angle?

BR,
Ulf W

Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com

_______________________________________________
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.
Eric Merritt  
View profile  
 More options Jul 4 2011, 11:47 am
From: Eric Merritt <ericbmerr...@gmail.com>
Date: Mon, 4 Jul 2011 10:47:48 -0500
Local: Mon, Jul 4 2011 11:47 am
Subject: Re: [erlang-questions] Scoped group leaders

> On Mon, Jul 4, 2011 at 10:15 AM, Ulf Wiger <ulf.wi...@erlang-solutions.com> wrote:

> On 4 Jul 2011, at 16:15, Eric Merritt wrote:

>> I can actually see a ton of uses for this. Not the least of which is
>> security, I just did a deep security piece in an erlang app, and it
>> turned out well, but I could see where something like this would have
>> made it much more elegant

> How, exactly?

In the existing model a context is passed through out the system,
identifying the users and their capabilities. In this case, assuming
that all threads related to use where spawned at some level by the
incoming process, a context would not have had to be passed, it could
have been implicit in the group leader. This would have been much less
invasive in the system. I made no attempt to protect against
developers adding malicious code to the system. That is hard
regardless of the model. Perhaps this would have been better called an
access control system rather then a security system given the
assumptions.

> The things that are difficult to do today, in terms of security in Erlang, is to *enforce* security in a way that cannot be subverted.

> Group leaders are natural for IO, since IO necessarily involves sending a message to some entity. Some other things are overloaded -
>e.g. the application controller using the group leader to find out which application a process belongs to. That is a clear case where I think
>this would be useful: an "application group leader". But for security, I don't see it solving any of the problems I consider difficult - perhaps
>this is my failing: after having implemented reasonably transparent security in ErlHive, I get all kinds of associations to nasty problems
>that wouldn't be helped by this suggestion. But perhaps you are viewing it from a different angle?

I am not thinking about this as solving any truly hard problems, not
that can't be solved in some other way. It just would have made the
code created for this project, more elegant, and the security aspects
much less invasive then they currently are, at the cost of slightly
more difficult testing and some knowledge about where the process
group boundries are.

> BR,
> Ulf W

> Ulf Wiger, CTO, Erlang Solutions, Ltd.
> http://erlang-solutions.com

_______________________________________________
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.
Yurii Rashkovskii  
View profile  
 More options Jul 4 2011, 12:13 pm
From: Yurii Rashkovskii <yra...@gmail.com>
Date: Mon, 4 Jul 2011 09:13:50 -0700
Local: Mon, Jul 4 2011 12:13 pm
Subject: Re: [erlang-questions] Scoped group leaders
Eric,

> The only thing that would concern me (from
> looking at your implementation) is how much over head is added to
> process creation. I think thats probably the main unknown, there are
> probably some other things as well.

Judging by my limited "unscientific" performance testing that I did
yesterday, I've got virtually no impact for situations where you do
not create any extra group leaders (i.e. running code that can be done
today). In a case when you have a hundred extra group leaders, it
slows down by about 2.5 times.

Please bear in mind that current implementation is a proof-of-concept
level quality. I can already foresee some techniques for speeding up
group leader allocation by allocating on process creation in bulk,
it's rather simple and will reduce number of allocations to just one.
In fact, this is so easy I might update this PoC implementation rather
soon! It sounds like a good idea.

> Just out of curiosity does a group leader go away when a group dies?

Define group death?
_______________________________________________
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.
Eric Merritt  
View profile  
 More options Jul 4 2011, 12:18 pm
From: Eric Merritt <ericbmerr...@gmail.com>
Date: Mon, 4 Jul 2011 11:18:39 -0500
Local: Mon, Jul 4 2011 12:18 pm
Subject: Re: [erlang-questions] Scoped group leaders

>> Just out of curiosity does a group leader go away when a group dies?

> Define group death?

When when all processes in a group have terminated, either normally or
abnormally.
_______________________________________________
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.
Yurii Rashkovskii  
View profile  
 More options Jul 4 2011, 12:21 pm
From: Yurii Rashkovskii <yra...@gmail.com>
Date: Mon, 4 Jul 2011 09:21:41 -0700
Local: Mon, Jul 4 2011 12:21 pm
Subject: Re: [erlang-questions] Scoped group leaders

On Mon, Jul 4, 2011 at 9:18 AM, Eric Merritt <ericbmerr...@gmail.com> wrote:

>>> Just out of curiosity does a group leader go away when a group dies?

>> Define group death?

> When when all processes in a group have terminated, either normally or
> abnormally.

I have intentionally decided not to overcomplicate current
implementation. Right now nothing will happen.
_______________________________________________
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.
Robert Virding  
View profile  
 More options Jul 4 2011, 7:57 pm
From: Robert Virding <robert.vird...@erlang-solutions.com>
Date: Mon, 4 Jul 2011 23:57:53 +0000 (GMT)
Local: Mon, Jul 4 2011 7:57 pm
Subject: Re: [erlang-questions] Scoped group leaders
----- "Eric Merritt" <ericbmerr...@gmail.com> wrote:

> >> Just out of curiosity does a group leader go away when a group
> dies?

> > Define group death?

> When when all processes in a group have terminated, either normally
> or
> abnormally.

Today there is nothing in the system which keeps track of the processes in a group, process groups don't really exist at all. A "process group" is those processes which have the same group leader. The group leader has no information about which processes have it as group leader. You can make any process a group leader by setting it as group leader.

Process groups were explicitly added in such a way as NOT to impose any structure or hierarchy on processes, process space is flat.

Robert
_______________________________________________
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.
Yurii Rashkovskii  
View profile  
 More options Jul 4 2011, 8:01 pm
From: Yurii Rashkovskii <yra...@gmail.com>
Date: Mon, 4 Jul 2011 17:01:07 -0700
Local: Mon, Jul 4 2011 8:01 pm
Subject: Re: [erlang-questions] Scoped group leaders
On Mon, Jul 4, 2011 at 4:57 PM, Robert Virding

<robert.vird...@erlang-solutions.com> wrote:
> Today there is nothing in the system which keeps track of the processes in a group, process groups don't really exist at all. A "process group" is those processes which have the same group leader. The group leader has no information about which processes have it as group leader. You can make any process a group leader by setting it as group leader.

> Process groups were explicitly added in such a way as NOT to impose any structure or hierarchy on processes, process space is flat.

That's right. I personally understand them as "ephemeral" notions,
just like you defined. That's why I don't do anything if a group
leader dies. It's a duty of individual process to decide what to do
with this.

Yurii
_______________________________________________
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.
Eric Merritt  
View profile  
 More options Jul 5 2011, 11:05 am
From: Eric Merritt <ericbmerr...@gmail.com>
Date: Tue, 5 Jul 2011 10:05:53 -0500
Local: Tues, Jul 5 2011 11:05 am
Subject: Re: [erlang-questions] Scoped group leaders
I understand and that makes sense, but it does raise a potential
problem. That is group leaders are created but never destroyed. In the
case of the process itself, this is probably ok. The developer will
have to create some mechanism to know when his group leader is no
longer useful and have it die on its own. However, I didn't see any
mechanisms to unregister group leaders and reclaim the memory alloced
when they are created. That could be me missing something when I was
looking at the code, if so then the point is moot, however if not
that's something that would probably need to be added to make this
workable. Of course, that still leaves the problem that if a group
leader dies unexpectedly, or the user mis-codes his application and
forgets to unregister a group leader when it dies, then he has a
memory leak. You could say that its a users problem and go from there,
but leaving around unreferenced memory just doesn't smell right. (I
know, we do that already with the atom table, but it doesn't make it a
good thing)

On Mon, Jul 4, 2011 at 6:57 PM, Robert Virding

_______________________________________________
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.
Eric Merritt  
View profile  
 More options Jul 5 2011, 11:34 am
From: Eric Merritt <ericbmerr...@gmail.com>
Date: Tue, 5 Jul 2011 10:34:52 -0500
Local: Tues, Jul 5 2011 11:34 am
Subject: Re: [erlang-questions] Scoped group leaders
I wouldn't expect in in the prototype. I am more thinking of the end result.

_______________________________________________
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.
Yurii Rashkovskii  
View profile  
 More options Jul 5 2011, 11:31 am
From: Yurii Rashkovskii <yra...@gmail.com>
Date: Tue, 5 Jul 2011 08:31:36 -0700
Local: Tues, Jul 5 2011 11:31 am
Subject: Re: [erlang-questions] Scoped group leaders
Right now there is no way to remove a group leader from process, but
it is not inherently impossible to do so, just was out of scope of
this prototype.

_______________________________________________
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.
Eric Merritt  
View profile  
 More options Jul 5 2011, 7:14 pm
From: Eric Merritt <ericbmerr...@gmail.com>
Date: Tue, 5 Jul 2011 18:14:08 -0500
Local: Tues, Jul 5 2011 7:14 pm
Subject: Re: [erlang-questions] Scoped group leaders
I am talking about the situation where no process that where once part
of the group exist any longer. When a group has no processes, the
group no longer exists, however the memory alloced by this will
continue to exist, thats the problem.

On Tue, Jul 5, 2011 at 6:04 PM, Robert Virding

_______________________________________________
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.
Robert Virding  
View profile  
 More options Jul 5 2011, 8:34 pm
From: Robert Virding <robert.vird...@erlang-solutions.com>
Date: Wed, 6 Jul 2011 00:34:23 +0000 (GMT)
Local: Tues, Jul 5 2011 8:34 pm
Subject: Re: [erlang-questions] Scoped group leaders
It's not that bad, the only memory allocated is for the group leader process.

----- "Eric Merritt" <ericbmerr...@gmail.com> wrote:

_______________________________________________
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.
Robert Virding  
View profile  
 More options Jul 5 2011, 7:04 pm
From: Robert Virding <robert.vird...@erlang-solutions.com>
Date: Tue, 5 Jul 2011 23:04:02 +0000 (GMT)
Local: Tues, Jul 5 2011 7:04 pm
Subject: Re: [erlang-questions] Scoped group leaders
Conceptually a process is always the member of a group so the very idea of removing a group leader from a process does not make sense. All you can do is assign it another group leader.

Robert

----- "Eric Merritt" <ericbmerr...@gmail.com> wrote:

_______________________________________________
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     Older topic »