1

While discovering SF Reliable Services I want to make sure that next basic statements are true.

  1. Reliable Services Default Communication stack (DefaultStack) and Reliable Actors Communication stack (using ServiceProxy/ActorProxy) can only be used for communicating inside SF Cluster. Customers from outside must use WebAPI/WCF stacks.

  2. ServicePartitionResolver, CommunicationClientFactory, ServicePartitionClient are stuff that already implemented inside DefaultStack. I don't have to worry about it if I use only DefaultStack.

  3. Some Stateful service has more then one partition, and I want for example to post an item to process it. It is not SF's responsibility to decide what exactly partition should be used by posting customer. I need manually implement an algorithm resolving partition key or name and use it in ServiceProxy constructor (for DefaultStack).

AsValeO
  • 2,859
  • 3
  • 27
  • 64

1 Answers1

2

You're correct on all those points,

  1. If you want to communicate outside Service Fabric you need to use something like an OwinCommunicationListener (see here).
  2. You’d only have to implement those if you wanted to plug in your own communication stack.
  3. Yep, you’d need to define the partition key when you’re creating a ServiceProxy.
charisk
  • 3,190
  • 2
  • 24
  • 18
  • You might know the answer to this. Is there a way to automatically get a partition key? I want my calls to this service be distributed to different instances in different partitions. I don't want to have to know how many services exists. – Jerome Haltom Dec 01 '15 at 01:07
  • That really depends on what your partition strategy is. How are you splitting your data and what component knows how to create partition keys? This component can be anything from an extension method to a dedicated stateless service that routes requests to the correct service partition. – charisk Dec 01 '15 at 21:29
  • I suppose I haven't thought through all that just yet. I have yet to figure out how partitions of different services should be related. Right now I just have a StatefulActor that is attempting to invoke a StatelessService to queue a work item and have it processed asynchronously. – Jerome Haltom Dec 02 '15 at 16:30