[jboss-jira] [JBoss JIRA] Commented: (JBREM-641) re-implement the callback polling for http transport to reduce latency

Ron Sigal (JIRA) jira-events at lists.jboss.org
Tue May 22 01:03:52 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBREM-641?page=comments#action_12362817 ] 
            
Ron Sigal commented on JBREM-641:
---------------------------------

A new blocking form of pull callbacks has been implemented.  In nonblocking mode, ServerInvokerCallbackHandler.getCallbacks() will immediately return as many callbacks as it has available, possibly 0.  In blocking mode, if getCallbacks() finds that no callbacks are currently available, it will wait for some configured amount of time for a callback to be created.  If a callback is created before the time expires, it will return that callback.  If the time expires before any callbacks are created, it will return an empty list.

There are relevant two parameters that can be configured, and a variety of ways of configuring them.  The first parameter is ServerInvoker.BLOCKING_MODE (actual value "blockingMode"), which can be set to one of two values: ServerInvoker.BLOCKING (actual value "blocking") and ServerInvoker.NON_BLOCKING (actual value "nonblocking").  The blocking mode for pull callbacks is configured on a per invocation basis, passing ServerInvoker.BLOCKING_MODE in the Client.getCallbacks() metadata map.  The default value is "nonblocking".  Blocking pull callbacks can also be used in the context of polled callbacks by org.joss.remoting.callback.CallbackPoller.  In this case, blocking mode is configured by passing ServerInvoker.BLOCKING_MODE in the Client.addListener() metadata map.  The default value used by CallbackPoller is "blocking".

The other parameter is ServerInvoker.BLOCKING_TIMEOUT (actual value "blockingTimeout), which determines how long ServerInvokerCallbackHandler.getCallbacks() will wait for the creation of a callback.  The default value is 5000 milliseconds, which may be overridden in two ways.  ServerInvoker.BLOCKING_TIMEOUT may be added to the Client.addListener() metadata map, and the associated value will become the default timeout for subsequent blocking mode pull callbacks.  Also, a per invocation value may be configured by putting ServerInvoker.BLOCKING_TIMEOUT in the Client.getCallbacks() metadata map.

Unit test: org.jboss.test.remoting.callback.pull.blocking.BlockingPullCallbackTestCase.

> re-implement the callback polling for http transport to reduce latency
> ----------------------------------------------------------------------
>
>                 Key: JBREM-641
>                 URL: http://jira.jboss.com/jira/browse/JBREM-641
>             Project: JBoss Remoting
>          Issue Type: Task
>      Security Level: Public(Everyone can see) 
>          Components: callbacks
>    Affects Versions: 2.0.0.GA (Boon)
>            Reporter: Tom  Elrod
>         Assigned To: Ron Sigal
>             Fix For: 2.4.0.Beta1 (Pinto)
>
>
> Per forum thread, would be nice to have a more "real-time" way to get callbacks from server when using http transport so don't have to wait on ping period.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list