Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1362

Efficient creation of large number of stateful Actors

$
0
0

@simha wrote:

My query is on how to efficiently create large number of stateful Actors. For example, a Bank Account Actor which stores balance as its State. As Actor follows Isolated mutability, they can not have a shared object say list of Bank_Account. I see two approaches to create Actors for this usecase;

  1. Create one Actor for each Account. Would not this be inefficient in terms of resource usage?

  2. Create required Actor/s on demand based on the operation and delete them once the operation is completed (say create 2 Actor in case of money_transfer usecase). What is the cost of such creation?

Queries:

  1. Are there any effificient approaches?
  2. We have Threadpool to reduce the cost of frequent creation and deletion of threads. Is there any similar approaches for Actors?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 1362

Trending Articles