Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
752 views
in Technique[技术] by (71.8m points)

c# - How to create actor proxy to remote Service Fabric cluster

According to the Service Fabric docs (https://azure.microsoft.com/en-us/documentation/articles/service-fabric-reliable-actors-introduction/), an actor proxy is created this way:

ActorId actorId = ActorId.NewId();

IMyActor myActor = ActorProxy.Create<IMyActor>(actorId, new Uri("fabric:/MyApp/MyActorService"));

await myActor.DoWorkAsync();

Ok, this works and connects to my local cluster. But I cannot figure out how to create a proxy to a remote cluster? (I have a three-node cluster with the IPs 10.0.10.10, 10.0.11.10, 10.0.12.10.)

I also tried to use the ServicePartitionResolver, which is explained here: https://azure.microsoft.com/en-us/documentation/articles/service-fabric-reliable-services-communication/, but without success.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

ActorProxy and ServiceProxy today works best for connecting to actors and services within the cluster. You can expose a stateless service with -1 instance count that can accept the user requests and then use Actor and Service remoting to connect to the actor service within the cluster. In the future release we may offer out of the box application gateway that supports remoting.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...