[英]Where is the state stored in Actor model (Akka.net)?
I'm new to Actor model. 我是Actor模特的新手。 I'm planning on implementing the Actor model for one of my projects, so I started reading about Akka.Net.
我正计划为我的一个项目实现Actor模型,所以我开始阅读有关Akka.Net的内容。 From the documentation, it appears that the state of the Actor is persisted throughout the life of the Actor.
从文档中可以看出,Actor的状态在Actor的整个生命周期中都是持久的。
1.Where is the state stored? 1.国家存储在哪里? On the ram?
在公羊? If so wouldn't we run out of ram space?
如果是这样,我们不会用完ram空间?
2.How do I implement Actor model when I have millions of records? 2.当我有数百万条记录时,如何实现Actor模型? Say I want to implement an Actor for customers table that has a million records.
假设我想为拥有一百万条记录的customers表实现一个Actor。 How would I load up the customers?
我如何加载客户?
By default all actor state is represented directly in memory. 默认情况下,所有actor状态都直接表示在内存中。 You can choose to persist it (for scenarios using eventsourcing, there's an Akka.Persistence library), but this is opt in decision.
您可以选择保留它(对于使用事件源的场景,有一个Akka.Persistence库),但这是选择决定。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.