apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: [PATCH] LDAP support for apr-util
Date Tue, 31 Jul 2001 15:25:47 GMT
On Tue, Jul 31, 2001 at 10:04:24AM -0400, Bill Stoddard wrote:
> > For reliability reasons, you probably want to use asynchronous bindings.
> >
> > Do:
> > ldap_init
> > ldap_simple_bind
> > ldap_result
> >
> > If the LDAP server is unreachable, you'll block waiting for the server
> > to respond.  It's really preferable to use asynchronous bindings (I've
> > used 1 second timeouts in the past).
> >
> > What I've typically done (see above URL) is to do the connection to the
> > server asynchronously and then everything else synchronously.  If the
> > server dies in the middle, you are screwed.  But, to be done "right,"
> > you probably want to use asynchronous everywhere.  Something like the
> > timeout values in APR for sockets.  I dunno - it's a thought.
> >
> >
> 
> Isn't this only useful if your application is able to support event driven (or async)
I/O?
> The connect to the LDAP server definitely needs to have a timeout, regardless.

I was thinking of something similar to the socket code.  It uses the
asynchronous calls, but then waits for a timeout value for a response.
If it doesn't return in time, APR_TIMEUP is returned.  I see no
fundamental reason why that model couldn't work with LDAP's async
calls.  

(Truly async LDAP could be a nightmare to code though.)  -- justin


Mime
View raw message