Callbacks
tom.elrod Feb 4, 2005 1:55 PMI was talking with John about callbacks and we started getting into a good bit of design discussion, so wanted to post it hear for reference and any feedback.
First off, the Callback object needs to have information about which server made the callback (for push callbacks in particular). So will include the server locator in with the Callback object for this. Will also include ability to pass a callback handle object (like is done with JMX notifications).
Next up is pull callbacks. One issue is the storing of callbacks on the server waiting for the client to call to get the callbacks. Will need to have some server configuration to define the policy for handling memory management for these callbacks. Will likely handle in one of two ways (probably both); 1. Have some expiration on the callbacks so that if they are not picked up by a certain time, they will be thrown away and 2. persist the callbacks message depending on some size constraint (similar to way jms softens messages).
Another idea on this is to have the remoting client (under the covers) automatically poll for callbacks at some regular interval on behalf of the user. Then when the user makes to get the callback objects, they will be returned locally (this makes callbacks for the client fairly fast). Another option is to actually piggy back callbacks on invocation responses, but only problem is can not control frequency of this (but obviously helps in performance). Maybe some combination of the two, depending on when the last invocation was made. However, this poses the memory problem now on the client side (which IMHO is better than on the server side). So will need some way to manage memory on the client side. Will also need to make this configurable, as some clients may not want to have callbacks stored in client memory space due to memory constraints.
Ok. Fire away.
-Tom
 
     
    