Hi Arno,

I think you need a separate persistent actor that will keep track of 
long-term scheduled events. It will be active at all times and keep an 
agenda of future notifications in it's persistent storage. It will use 
ActorSystem Scheduler to wake itself up when it's time to send out next 
(batch of) notification(s). A message sent to a shared User entity will 
activate the target if necessary.
I think it will be reasonable from resource management point of view, and 
also safe against system restarts.

Cheers,
Rafał 

W dniu środa, 8 marca 2017 06:35:11 UTC+1 użytkownik Arno Haase napisał:
>
> I am working on a social media kind of system, and we have users 
> represented as sharded persistent entities. Now we want to react to 
> users' inactivity, e.g. sending out 'come back' emails to users who were 
> inactive for a week. 
>
> Any suggestions for how to implement that? Scheduling (and mostly 
> cancelling) messages in every user's actor seems both wasteful and 
> unreliable, at least if we remove long unused entities from memory. 
>
> All ideas are welcome! 
>
> - Arno 
>

-- 
>>>>>>>>>>      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