Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-971

RpcDispatcher/MessageDispatcher: additional methods which return a Future rather than blocking

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 2.8
    • None
    • None
    • 0
    • 0% 0%

    Description

      Currently, synchronous (cluster-wide) calls in RpcDispatcher and MessageDispatcher block until all (or a portion) of the responses have been received.
      Goal: to provide additional methods for callRemoteMethods() and castMessage() which return a Future<RspList>. This allows a user to dispatch multiple blocking calls and fetch the result later, e.g. (pseudo code):

      Future<RspList> r1, r2;
      r1=dispatcher.callRemoteMethods(null, "foo", new Object[]

      {10}, new Class[](int.class}, GroupRequest.GET_ALL, 5000);
      r2=dispatcher.callRemoteMethods(null, "bar", new Object[]{10}

      , new Class[](int.class}, GroupRequest.GET_ALL, 5000);

      // do something
      if(r1.isDone()) {
      RspList rsp_1=r1.getResult();
      }

      This should be combined with a notification mechanism (RspFilter) so a users gets notified (if desired) of each response, and also when the result is complete

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-bban Bela Ban
              rhn-engineering-bban Bela Ban
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: