Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
738 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...