简体   繁体   English

Azure Service Fabric参与者和服务

[英]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 . 例如,您可以在其上层叠ASP.NET Core并编写Web API / MVC服务

Reliable Actors is a highly specialized framework for parallelizing compute. 可靠的参与者是用于并行化计算的高度专业化的框架。 Only certain types of services fit nicely into the Virtual Actor pattern. 只有某些类型的服务才能很好地适合Virtual Actor模式。 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. 您的actor实例不会通过发出I / O操作而以不可预测的延迟阻止调用者。

Most general CRUD-style apps don't fall into this space. 大多数通用CRUD风格的应用程序都不属于这个领域。 More on that here: https://docs.microsoft.com/azure/service-fabric/service-fabric-reliable-actors-introduction 此处的更多信息: https : //docs.microsoft.com/azure/service-fabric/service-fabric-reliable-actors-introduction

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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