Wednesday, April 6, 2016

[389-devel] Re: Subscribing for notification when an entry changes using SOAP

On Wed, 2016-04-06 at 21:12 +0000, anteneh assen wrote:
> I need an application, which uses the directory server for storage, to be able
> to subscribe for notification when a specific kind entry/attribute/sub-tree is
> changed by another application(the application could be same kind of
> application or not). The application would use SOAP to send subscription
> request and receive the response. After the application has successfully
> subscribed for notification the DS should send a notification to the app using
> SOAP. 
> Is it possible to write code to implement this feature and if yes how hard
> would it be?
>

This list is for development discussion of the 389 system, not for "developing
against" 389. Next time, please use the 389-users list :) 

However, the answer to your question.

You can look for notifications of changes in DS with two mechanisms. Syncrepl,
where the server will send you changes as they are made and you can see them, or
persistent search, where as entries change, the server sends them to you. 


I believe you will want persistent search here. Here is the python docs, but it
can be done in any ldap client library.

https://www.python-ldap.org/doc/html/ldap-controls.html#module-ldap.controls.psea
rch


It shouldn't be very difficult to write I don't think.

You would need a thread that handles the persistent search, and this can queue a
log of the changess.

Then you can have another thread that looks at the "log" and sends the events via
the soap call to the other service.


Does that help you? 


--
Sincerely,

William Brown
Software Engineer
Red Hat, Brisbane

No comments:

Post a Comment