Patrik,
 Got it. Thank you!
Yan

On Friday, April 22, 2016 at 10:44:27 AM UTC-5, Patrik Nordwall wrote:
>
> No, each persistent actor will only replay its own events. The 
> persistenceId is part of the key in the cassandra table.
> fre 22 apr. 2016 kl. 16:53 skrev Yan Pei <yan...@gmail.com <javascript:>>:
>
>> Patrik,
>>
>>   Thank you for your response.
>>   My understanding is  all persistent actors will replay all messages 
>> from Cassandra table from last snapshot. For example there are 20000 
>> messages and 1000 persistent actor, there will be 20000000 messages in the 
>> memory once the application is started.  Did I understand it correctly. 
>>    My plan now is not to instantiate so many persistent actors as 
>> originally designed and add some snapshots during sending messages.
>>    We might not able to use cluster because of CloudFoundry.
>>
>> Best,
>> Yan
>>
>> On Friday, April 22, 2016 at 8:17:11 AM UTC-5, Patrik Nordwall wrote:
>>>
>>>
>>>
>>> On Thu, Apr 21, 2016 at 11:53 PM, Yan Pei <yan...@gmail.com> wrote:
>>>
>>>> Hi All,
>>>>
>>>>    If I have lots of persistence actors in the ActorSystem, during 
>>>> recovering each instance of actor will read the same set of data into 
>>>> memory, potentially is it an issue? I have concern that it might cause 
>>>> OutOfMemory exception for a large load of data.
>>>>
>>>
>>> What do you mean by "same set of data". Same as what?
>>>
>>> It's true that you must have memory for all running actors, that is the 
>>> same for ordinary actors as for persistent actors. During recovery the 
>>> persistent actors replay events, but you don't have to retain the events in 
>>> memory. Those can be garbage collected when they have been processed to 
>>> build up current state.
>>>
>>> You can use Cluster Sharding to spread many persistent actors over a 
>>> many nodes.
>>>
>>> Cheers,
>>> Patrik
>>>  
>>>
>>
>>>> Thanks,
>>>> Yan
>>>>
>>> -- 
>>>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>>>> >>>>>>>>>> Check the FAQ: 
>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>> >>>>>>>>>> Search the archives: 
>>>> https://groups.google.com/group/akka-user
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Akka User List" group.
>>>>
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to akka-user+...@googlegroups.com.
>>>> To post to this group, send email to akka...@googlegroups.com.
>>>
>>>
>>>> Visit this group at https://groups.google.com/group/akka-user.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> -- 
>>>
>>> Patrik Nordwall
>>> Akka Tech Lead
>>> Lightbend <http://www.lightbend.com/> -  Reactive apps on the JVM
>>> Twitter: @patriknw
>>>
>>> -- 
>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>> >>>>>>>>>> Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Akka User List" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to akka-user+...@googlegroups.com <javascript:>.
>> To post to this group, send email to akka...@googlegroups.com 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to