Re: [jgroups-users] Scope implementation for JGroups 4
Questions/problems related to using JGroups <[email protected]> Thu, 20 Jul 2017 13:13:42 +0200
| Newsgroups | gmane.comp.java.javagroups.general |
|---|---|
| Message-ID | <mailman.33150.1500549232.17807.javagroups-users@lists.sourceforge.net> |
On 20/07/17 13:01, Questions/problems related to using JGroups wrote:
> We migrated our code from JGroups 3.6.6 to 4.0.2. It was known from the
> JGroups manual that SCOPE would be deprecated in the upcoming versions and
> we did not make direct use of the SCOPE protocol. We had been using Async
> dispatching with request handlers (in 3.6.6) but we continued to use the
> RequestOptions.setScope and Message.getScope methods (I didn't know that it
> was removed as well). When migrating to JGroups 4 I had to add scope along
> with the data being sent in the RPC. Something like this,
> rpcDispatcher.callRemoteMethods(null, "processRequest", new Object[]
> {request}, new Class[] {Request.class}, requestOptions);
> Here scope was a part of the Request class. Scope could have been added as a
> separate argument as well. The trouble was at the handle method.
>
> Obtaining scope this way seems odd since it was straight forward in version
> 3.6.6. Can this be done better?
The Async Invocation API is very generic and its main goal is to let the
application completely control message delivery. This is much broader
than SCOPE.
So what you pass with a message or RPC (the scope) is an application
defined criteria by which you order the incoming messages. Whether this
is shipped as part of the request options, or as a separate parameter,
is up to you. I would suggest, since you're using RPCs, that you pass
this as a regular additional argument, so you don't need to go through
the hoops of having to extract RequestOptions from a MethodCall etc...
> --
> View this message in context: http://jgroups.1086181.n5.nabble.com/jgroups-users-Scope-implementation-for-JGroups-4-tp11354p11360.html
> Sent from the JGroups - General mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> javagroups-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/javagroups-users
>
--
Bela Ban | http://www.jgroups.org
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot