[erlang-questions] Erlang-based opensource publish-subscribe servers

Augusto Becciu augusto@REDACTED
Wed Oct 27 03:02:53 CEST 2010


Hi Ulf,

On Tue, Oct 26, 2010 at 3:58 AM, Ulf Wiger
<ulf.wiger@REDACTED> wrote:
>
> Hi Augusto,
> Thanks. Could you explain your approach to handling the dynamic
> adding/removal of candidates, how you've tested it and why you
> believe it's safe?

The algorithm to add nodes dynamically, along with some failure
scenarios, is explained here: http://gist.github.com/499825
I haven't worked on dynamic removal, but you can just shut down nodes
and they will be put in the 'down' list.

I haven't done rigorous analysis or testing on it. Just tested the
cases I documented in the gist linked above and some other similar
ones. I started working on a test suite using eunit and mcErlang but
ran out of time in the last months. I'm still interested in developing
it though, and hope to get more free time to finish it by December.

I very much appreciate any feedback you can provide on this. :)

>
> Note that I'm not suggesting it isn't safe. :)
> Just that it touches on the core algorithm, and I think many would feel
> more comfortable using it if the changes were thoroughly explained.

It doesn't modify the core algorithm. It works like an extension to
it. The code is only used if you add the option {seed, Node} to start
the node.

I encourage people to use my fork not because of the possibility to
add nodes dynamically, but because it contains many fixes (major and
minor), cleaned up code, and proper project organization with
rebarized build system.

Of particular interest to gproc_dist users are these two fixes:

1) http://github.com/abecciu/gen_leader_revival/commit/686da14f9a349ce4891ca910ba997e30b46b3860

Without this fix, when a leader goes down and other node takes over
leadership, all the elements registered by the old leader won't be
removed.

2) http://github.com/abecciu/gen_leader_revival/commit/64903e4d4a765ce8e9ca765f0a1a8ce59f833627

Without this fix, any request made to gproc_dist during the election
process will make it crash.


Cheers,
Augusto


> BR,
> Ulf W
> On 26 Oct 2010, at 04:04, Augusto Becciu wrote:
>
> Here's my fork of gen_leader where I fixed all the bugs I encountered while running gproc in a distributed setting:
> http://github.com/abecciu/gen_leader_revival
>
> Augusto
>
> On Sun, Oct 24, 2010 at 6:28 PM, Ulf Wiger <ulf.wiger@REDACTED> wrote:
>>
>> On 24 Oct 2010, at 21:22, Zvi . wrote:
>>
>> > 3. Use Ulf's gproc (looks it uses gen_leader abd requires patching Erlang?)
>>
>>
>> No, it requires no patches of Erlang. I patched Erlang in the first prototype,
>> but only to demonstrate what it could look like if gproc were started as
>> part of the kernel application, and the functionality integrated into the
>> standard behaviours.
>>
>> It does use gen_leader, though. As  far as I can tell, quite a few people
>> actually use gen_leader in real systems nowadays. There are a few
>> forks on github to choose from.
>>
>> BR,
>> Ulf W
>>
>> >
>> > I currently working on 1.
>> >
>> > Zvi
>> >
>> > On Sun, Oct 24, 2010 at 8:41 PM, Andrew Stone <stondage123@REDACTED> wrote:
>> >
>> >> If you want something powerful you can checkout rabbitmq. It may be
>> >> overkill but
>> >> it's pretty damn easy to get up and running.
>> >>
>> >> http://www.rabbitmq.com/
>> >>
>> >> -Andrew
>> >>
>> >>
>> >>
>> >> ----- Original Message ----
>> >> From: Zvi <zvi.avraham@REDACTED>
>> >> To: erlang-questions@REDACTED
>> >> Sent: Sun, October 24, 2010 1:10:46 PM
>> >> Subject: [erlang-questions] Erlang-based opensource publish-subscribe
>> >> servers
>> >>
>> >> Hi,
>> >>
>> >> I looking for the opensource examples of Erlang-based publish-
>> >> subscribe servers.
>> >> Any suggestions?
>> >>
>> >> Thanks in advance,
>> >> Zvi
>> >>
>> >> ________________________________________________________________
>> >> erlang-questions (at) erlang.org mailing list.
>> >> See http://www.erlang.org/faq.html
>> >> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>> >>
>> >
>> >
>> >
>> > --
>> > Zvi Avraham, CTO
>> > Nivertech Ltd
>>
>> Ulf Wiger, CTO, Erlang Solutions, Ltd.
>> http://erlang-solutions.com
>>
>>
>>
>>
>> ________________________________________________________________
>> erlang-questions (at) erlang.org mailing list.
>> See http://www.erlang.org/faq.html
>> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>>
>
>
> Ulf Wiger, CTO, Erlang Solutions, Ltd.
> http://erlang-solutions.com
>
>


More information about the erlang-questions mailing list