[Libevent-users] A server framework library based on
libeventthat implements the Half-Sync/
liusifan
liusifan at 21cn.com
Thu Mar 15 20:31:36 EDT 2007
Hi, Dmitri
>>>Dmitri,
>
>On 3/15/07, Dmitri Kalinin <Dmitry.Kalinin at kaspersky.com> wrote:
>> Hi, Robert
>> I wonder why was the design decision to use Half-Sync/Half-Async pattern
>> but not the Leaders/Followers pattern which may be more efficient and
>> scalable? (http://www.cs.wustl.edu/~schmidt/PDF/lf.pdf)
>> Does libevent allows implementation of this multi-threaded pattern?
>
Because I am familiar with Half-Sync/Half-Async pattern, so I choose this pattern. :)
So it's an incidental choice.
At first, i intend to develop an anti-spam SMTP proxy.
With using ThreadPerConnection model, the proxy is working normal.
But the number of the connections is limited by the number of the threads,
so i try to find the other concurrent programming models.
It looks Half-Sync/Half-Async is pretty fix for an anti-spam SMTP proxy.
In the anti-spam SMTP proxy, these are many database operations.
(1) Almost all database only provide blocking client API, and
(2) it is difficult to program evening though we have non-blocking database client API.
So i had to construct a hybrid framework between threaded and event-driven to simplify
the construction of the anti-spam SMTP proxy.
Best regards,
Stephen
More information about the Libevent-users
mailing list