[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Overlays and OpenLDAP multi-threading model
- To: openldap-technical@openldap.org
- Subject: Re: Overlays and OpenLDAP multi-threading model
- From: Lucas Brasilino <lucas.brasilino@gmail.com>
- Date: Wed, 16 Jun 2010 14:39:51 -0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ep5jYisQyoe1vIJc1CfkpBljwkeO/up08LYWjdztieg=; b=slbIvN1zqKEedI+8LkRBYyXAUanR4ZRl2nnDBXrdi9xXaIJgFOfrV18ZBLQMLX2MPO bHgDKgWErUn/vq0r0vSvpc1APV7Z5EL3ZXOycYsazS8scUhIt74wze9mh0DmqYyHt3Dj ZJ1wK5hUEX+pq4wsrIsjoWQ7L/QYFNmsPfp3U=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=gWAZaSRqILzxvzVefz6T2K+PTnak2TAg/GBXQYTlRtK/TSJNVlyfvaJzzvFafoJm6z I8i0Xs3+hYPRxYUziEGU0Fmv9hbg0Jw4jr7wZCAmhm/Kuva0yWruuHr3JuvGM4YwhPSe Gw1Zo6wxCSWlpq5aIiLqgV0TMPCm4Gogr2lBo=
- In-reply-to: <79e737ede3837bcd3b45fb32168fab5f.squirrel@www.aero.polimi.it>
- References: <AANLkTilvhlxKct3uKCRNvgxutV_kt_pFpcqa4_ARKKvF@mail.gmail.com> <79e737ede3837bcd3b45fb32168fab5f.squirrel@www.aero.polimi.it>
Hi!
> The overlay stack is called within the execution of an operation. As
> such, it only affects the thread that executes that operation, unless your
> code does something nasty like locking global mutexes. This implies that
> it is *not* entirely blocking a connection: a connection can
> simultaneously spawn multiple operations. It is not clear from your
> message how your overlay can affect OpenLDAP connection handling, as this
> is not usually exposed in overlay handling.
I'm not aware about details of OpenLDAP multi-threading model, so I asked. :)
Imagine *if* each thread accepts one connection at time and it does
it's operations
in a 'serialized' manner:
accept connection from client => fills up accordingly structures =>
pass data to overlay => pass
data to backend => backend does it's job => pass data back to overlay
=> connection
response to client. In this case, if overlay processing takes a long
time, the connection
from *that* and only *that* client will be delayed.
By your answer I think each thread uses a event loop to perform each
operation, is that
right ?
I'll not touch any thread resources like mutexes, some global variable and
so on. It will not that evil :)
thanks a lot!
Lucas Brasilino