.NET Actor Model Implementations Differ in Approach

Vaughn Vernon提出了Dotsero,一个.NET Actor模型工具包,它遵循了Akka API。Orleans框架,一个基于Actor模型的云编程模型,由微软研究团队发布,旨在简化构建可扩展且可靠的服务。Orleans团队认为,尽管像Erlang和Akka这样的Actor平台简化了分布式系统的编程,但仍存在许多复杂性,主要是由于提供的抽象级别较低和系统服务相对较少。Orleans通过将Actor视为虚拟实体而非物理实体,提高了抽象级别。然而,Orleans缺乏支持有限状态机(FSM)的Become/Unbecome特性,这被认为是Actor模型的原始定义的一部分。此外,Orleans中的Actor始终存在,可能会导致客户端难以判断是否存在请求的对象。Richard Astbury创建了一个简单的IoT网关应用程序来展示Orleans如何帮助开发者构建高扩展、低延迟和健壮的.NET云应用。论文《Orleans:可编程性和可扩展性的分布式虚拟Actor》详细介绍了Orleans的设计原则。

Last week Vaughn Vernon, author of Implementing Domain-Driven Design, published Dotsero, a .NET Actor model toolkit written in C# that closely follows the Akka API. The Akka toolkit, an implementation of the Actor model, has so far been available with a Java and a Scala API.

A preview release of the Orleans framework, a cloud programming model also based on the actor model, was released earlier this year by Microsoft Research with a goal of minimizing the challenges when building interactive services that are scalable and reliable.

The Orleans team believes that although actor platforms such as Erlang and Akka are a step forward in simplifying distributed system programming, they are still burdened with many complexities because of the relatively low level of provided abstractions and system services. To build a correct solution they claim that a developer must be a distributed systems expert. To avoid these complexities and targeting mainstream developers the team has raised the level of the actor abstraction in Orleans. It is actor-based, but differs from existing actor-based platforms by treating actors as virtual entities, not as physical ones.

In a recent twitter discussion between Vaughn and Sergey Bykov, lead of the Orleans project at Microsoft Research, Vaughn claimed that Orleans is not really an Actor model implementation partly due to its lack of Become/Unbecome to support a Finite State Machine (FSM) which Vaughn claims is part of the original definition of actors. He also believes the fact that an Orleans actor always exists is error prone by making it hard for a client to realize if it’s asking for something that doesn’t exist.

Sergey answered by claiming that Become is just one way of reading the definition and therefore not a requirement of the actor model. In his experience he has also found that the fact that an Orleans actor always exists is much less error prone since it eliminates races and simplifies recovery. Cases where an actor shouldn’t exist are handled by application logic returning an error, which he admits it’s not ideal but still better than experiencing racing conditions when creating actors.

Recently Richard Astbury, a Microsoft MVP for Azure, created a simple Internet of Things gateway application to demonstrate his view of how Orleans can help developers in building high scale, low latency and resilient .NET applications for the cloud. Richard notes that although it’s a trivial example, it contains the basic building blocks for building more complicated scenarios.

A paper, Orleans: Distributed Virtual Actors for Programmability and Scalability, presenting the design principles behind Orleans was published in March.

Vaughn talked last year about Actor model in reactive domain-driven design (DDD) and in an earlier talk about the foundation for actor model together with DDD.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值