1)      I want an RPC to each instance of ODL in each cluster, which means if I 
have 3 instances in a cluster, and 2 clusters, I will invoke 6 RPCs. So it 
sounds like an HA proxy is not needed.

2)      Just to make sure I understand your suggestion.

a.      The scope of the RPCRegistry is indeed the cluster scope, and I can't 
really use "low-level" RPCs from outside the cluster.

b.      You are offering to invoke the RPC with JSON and RESTCONF. Does 
RESTCONF today offers an async Java implementation that will give me a Future? 
If yes, this Future will hold just the JSON return value of the RPC, not the 
actual result right? So the suggestion would be to implement a framework over 
this to convert it to the actual Binding objects? Does YANGTOOLS give me some 
framework for this today?

c.      Because in my usecase I'm talking about invoking API that still doesn't 
exist, I could theoretically implement this without RPCs. It sounds to me like 
it's much easier, faster, and less bug-prone to implement it with some kind of 
AsyncRMI, like this: https://github.com/barakb/asyncrmi/. What are your 
thoughts about this alternative?

From: controller-dev-boun...@lists.opendaylight.org 
[mailto:controller-dev-boun...@lists.opendaylight.org] On Behalf Of 
Muthukumaran K
Sent: Thursday, August 25, 2016 10:57 AM
To: Muthukumaran K <muthukumara...@ericsson.com>; Sela, Guy <guy.s...@hpe.com>; 
mdsal-...@lists.opendaylight.org; controller-dev@lists.opendaylight.org
Cc: Cohen, Elad <elad.coh...@hpe.com>; Alfasi, Shlomi <shlomi.alf...@hpe.com>
Subject: Re: [controller-dev] Invoking MD-SAL RPC's from outside the cluster

Sorry I missed out the part
I have another external ODL that is *not part of the Cluster*

In such a case, invoking RPC via RESTCONF with a HA proxy (just to ensure the 
RESTCONF call land up in only one of 3 nodes) would be an option. RPC consumer 
must be able to create required input JSON and be able to interpret RPC output 
JSON as per the RPC yang model of provider

Better alternative if HA Proxy is not preferred, there is a latest addition to 
ODL named Cluster Wide Singleton service - design document - 
https://bugs.opendaylight.org/attachment.cgi?id=1059

You  may want to take a look at this enhancement - 
https://bugs.opendaylight.org/show_bug.cgi?id=5421

Regards
Muthu



From: Muthukumaran K
Sent: Thursday, August 25, 2016 1:11 PM
To: 'Sela, Guy'; 
mdsal-...@lists.opendaylight.org<mailto:mdsal-...@lists.opendaylight.org>; 
controller-dev@lists.opendaylight.org<mailto:controller-dev@lists.opendaylight.org>
Cc: Alfasi, Shlomi; Cohen, Elad
Subject: RE: Invoking MD-SAL RPC's from outside the cluster

Hi Sela,

You might want to look into the Routed-RPC option for this if your performance 
requirements are not so severe.

To illustrate, in Openflowplugin, every switch in effect exposes a RPC and 
registers itself with the central routed-rpc registry. If a flow has to be 
provisioning from Node A but the switch is connected to Node B (or Node B is 
master of switch in OF high-availability lingo),  RPC call from Node A gets 
routed by MD-SAL infrastructure to Node B's RPC-provider of given switch.

I am not sure about your deployment model. But an important pre-requisite for 
above to work is that both RPC consumer(S) and RPC provider(s) must be on same 
Akka cluster

Hope this helps

Regards
Muthu


From: 
controller-dev-boun...@lists.opendaylight.org<mailto:controller-dev-boun...@lists.opendaylight.org>
 [mailto:controller-dev-boun...@lists.opendaylight.org] On Behalf Of Sela, Guy
Sent: Thursday, August 25, 2016 1:01 PM
To: mdsal-...@lists.opendaylight.org<mailto:mdsal-...@lists.opendaylight.org>; 
controller-dev@lists.opendaylight.org<mailto:controller-dev@lists.opendaylight.org>
Cc: Alfasi, Shlomi; Cohen, Elad
Subject: [controller-dev] Invoking MD-SAL RPC's from outside the cluster

Hi,
Let's say I have a cluster of 3 ODLs, and I have another external ODL that is 
not part of the Cluster.
Can this external ODL invoke RPCs on the ODLs in the cluster?
The current MD-SAL RPC framework allows me to invoke RPCs on remote machines in 
an async way, giving me a Future.
I want the same capability for a machine that doesn't live in the cluster.
If the answer is no, what do you think will be the best way to do it?

What we are trying to achieve is very similar to this library: 
https://github.com/barakb/asyncrmi/

Thanks,
Guy Sela

_______________________________________________
controller-dev mailing list
controller-dev@lists.opendaylight.org
https://lists.opendaylight.org/mailman/listinfo/controller-dev

Reply via email to