[erlang-questions] Re: Erlang and Event-Driven Programming
Jayson Vantuyl
kagato@REDACTED
Sun Jan 17 10:42:34 CET 2010
I suppose it's a matter of semantics. The vast majority of "event-driven" code you see these days isn't the "interrupt handler" pattern so much as reactor+deferred. I certainly didn't try to make much of a distinction. Good point nonetheless.
On Jan 17, 2010, at 1:39 AM, Zoltan Lajos Kis wrote:
> I agree that this certainly looks nicer than defining a callback. However this is not "event-driven", but more like "wait-for-that-driven". Code like this also results in all concurrent activities being blocked, as the selective receives involved will make all other messages queue up and wait. As soon as you need to handle concurrent events, you will end up implementing a common dispatcher with callbacks, just like in gen_servers.
>
> Zoltan.
>
> Yves S. Garret wrote:
>> Well, Erlang certainly does a good job of taking care of those
>> details.
>>
>> On Jan 15, 9:52 pm, Jayson Vantuyl <kag...@REDACTED> wrote:
>>
>>> One of the things that drove me to Erlang was that it neatly encapsulates event-driven programming. I loved writing code in Twisted and EventMachine, but I hated the mess of little blocks of code that it created. I realized during a discussion recently that the relation may not be obvious to someone who hasn't done either of those things before. So, I blogged about it. Enjoy:
>>>
>>> http://ta.gd/erlang_evented
>>>
>>> --
>>> Jayson Vantuyl
>>> kag...@REDACTED
>>>
>>
>> ________________________________________________________________
>> erlang-questions mailing list. See http://www.erlang.org/faq.html
>> erlang-questions (at) erlang.org
>>
>>
>>
>
>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
>
More information about the erlang-questions
mailing list