Amal Shalika
Amal Shalika

Reputation: 1267

How to create SHARED LIST for store objects for actor?

I want to calculate average complete time for a goods pick in giving store. Picking module will send a message with number of time to complete and store name when pick is complete to Actor A. Like wish each time it complete pick operation in different stores it sent a message with how long it takes to complete and name of the store to Actor A. The Actor stores those message in a SHARED LIST. At some time, another actor B will ask from actor A what is average time it takes to complete pick at store X. My problem is how can I store messages in SHARED LIST which will be any actor of type actor A?

Upvotes: 0

Views: 66

Answers (1)

Amal Shalika
Amal Shalika

Reputation: 1267

I was achieved this by using child per entity pattern in akka.net. StoreCoordinateActor create Store actor for each store place. Store actor created for each store. If particular store actor already exist used it without create new. So store actor itself has list to hold complete time. By using it can calculate avg complete time for store pick.

Here is good ref about child per entity pattern: http://gigi.nullneuron.net/gigilabs/child-per-entity-pattern-in-akka-net/

Upvotes: 2

Related Questions