[jboss-as7-dev] Add Notification support to the domain management API

Heiko W.Rupp hrupp at redhat.com
Mon Feb 18 03:08:01 EST 2013


Am 15.02.2013 um 18:00 schrieb Jeff Mesnil:
> At first, I did not want to add remote notifications support to our management API. Clients interested by it (web console, JBoss Tools, etc.) could add subsystems to bridge between the notifications and the transport protocol they can use. That's not a great idea though, we want to provide an uniform & stable way to manage AS7, not let every potential clients puts bits in the server-side to interact with it. 

We need to have one implementation at the api level, that all clients can use. Of course writing internal subsystems is über-cool,
but we should still consider people that want to write their client in e.g. perl.


> However, I don't have a good idea yet for the HTTP API.
> I see 2 types of clients for our HTTP API:
>  * web clients that uses HTTP only
>  * modern web browsers that can leverage Web Sockets
> 
> For the Web console (running in a Web browser), using the Web Sockets protocol seems a natural fit to handle notifications but that support web sockets protocol from AS7 management service (not sure if it's already in the pipeline).
> For plain-HTTP, we could also provide a more RESTful API but it'd be up to the clients to poll to check whether there are new notifications to handle. We could use long-polling techniques to push the notifications back to the clients but I don't know if that'd work outside of web browsers…
> If you have other ideas, don't hesitate to send me pointers.

Actually it may be a good first start (even if not "immediate") to just add all the notifications to a list of notifications, that
then get delivered to a client when if connects the next time.

e.g. 
:read-resource(bla=fasel)

returns
{
   payload={...}   // real read-resource data
   response-headers={
            notifications=[....]  // queued notifications
}

This partially already exists with the "reload-required"

"response-headers" => {
        "operation-requires-reload" => true,
        "process-state" => "reload-required"
    }

and would just need extending.

returning the list to the client would clear the queue.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://lists.jboss.org/pipermail/jboss-as7-dev/attachments/20130218/7d00e04e/attachment.bin 


More information about the jboss-as7-dev mailing list