[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Asyncronous, non blocking back- connector for Openldap

hptf wrote:
Hello all,

I would like to know if any of you have ever experiment a NONBLOCKING,
socket based back-* for OpenLdap server.

For obscure reasons, out of the scope of this mailing list, I must
compile openldap slapd with non-threaded option activated.

The data storage, we get data from, is accessed via standard TCP socket;
but some read can take time. Thus we cannot wait in a blocking TCP read .
We start our experiment with a modified version of back-sock ( using TCP
), but this back- use a blocking scheduling model.
     How can we put in slapd scheduling loop an alien socket managed by a
back- library ? ( SLAPD_ADD.... ?)
     How can back- be scheduled on socket reception ( Listener* ?)

Look at the code in syncrepl.c, which does those same actions. connection_client_setup() and other functions are needed for this. Another example that uses these same functions is in the nssov overlay.

     How can we asynchrously send LDAP response, and set the context for them

You'll need something like syncprov_op_detach() in syncprov.c.

     What should be answered at the first ldap request ( in the
back_search() for example) to say 'will be answered later' ?

There's no clean way to do this yet, we've been discussing a new return code for this purpose but haven't implemented it yet. syncprov.c does this by cloning the Operation so it can be re-queued, and then marking the original one as abandoned so that the frontend doesn't try to send any response to it right away.

Any help, or pointer to help,  even for only one of this point, would be
much appreciate!

  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/