简体   繁体   中英

Azure Service Fabric Actors and Service

Regarding service fabric applications, please help me to understand the decision factors where we need to choose a reliable actor over a reliable service and vice versa. It would be really helpful if you can provide examples of these and the reason why we choose one over another.

Thanks

Reliable Services is the place to start. Here you get a simple entry point to start running your code or start taking client requests. It's wide open to whatever design patterns or frameworks you want to use. You can layer ASP.NET Core on it, for example, and write Web API / MVC services .

Reliable Actors is a highly specialized framework for parallelizing compute. Only certain types of services fit nicely into the Virtual Actor pattern. You shouldn't use Reliable Actors as a general state storage mechanism or for general-purpose services because the pattern imposes certain restrictions. Reliable Actors is usually best in the following situations:

  • Your problem space involves a large number (thousands or more) of small, independent, and isolated units of state and logic.
  • You want to work with single-threaded objects that do not require significant interaction from external components, including querying state across a set of actors.
  • Your actor instances won't block callers with unpredictable delays by issuing I/O operations.

Most general CRUD-style apps don't fall into this space. More on that here: https://docs.microsoft.com/azure/service-fabric/service-fabric-reliable-actors-introduction

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM