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. Thus, 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* ?) How can we asynchrously send LDAP response, and set the context for them What should be answered at the first ldap request ( in the back_search() for example) to say 'will be answered later' ?
Any help, or pointer to help, even for only one of this point, would be much appreciate!
hp tf
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. Thus, 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!
openldap-software@openldap.org