These are chat archives for akkadotnet/

Apr 2016
Apr 23 2016 19:23
@qwoz you can use Quartz.Net and Akka.NET to achieve that, as you said you could persist the incoming messages which will come to the actor manager, after message is persisted you could put into the quartz and you're done, now at the other side when you will do a recovery from restarts you could simply put back the reminders to the quartz or you can also achieve the same without akka persistence, but you will need to create your mechanism for storing the reminders to the disks or to the DB when they are created, and on restart you could overwrite the PreStart() method and start the recovery of the reminders yourself, basicly its really easy to achieve these kind of things with akka with writing just couple of lines code. :smile:
Apr 23 2016 20:55
Thanks @bobanco ... if I understand it correctly, you're suggesting that upon a system restart, I would need to explicitly recreate instances of all the reminder actors, and have each reminder actor be responsible for loading up Quartz with its own schedule? I looked into Quartz briefly and it seems to have its own persistence mechanism for schedules (to a DB, rather than its RAM-based store). Perhaps it's possible to hook into that mechanism to recreate an instance of the specific reminder actor whose schedule has triggered rather than going through what I assume would be a relatively expensive operation of iterating over every single instance just to load up Quartz again. Or am I misunderstanding?
Apr 23 2016 21:41
@qwoz yes you can use quartz persistence as well, i haven't used quartz persistence so i can not give any info regarding how good is it, btw in this case you will just need a tiny wrapper on the quartz scheduler into single actor, you could even use akka cluster singleton tool and you can make sure that only 1 isntance is running trough the cluster if you are going on that way. Also quartz has support for clustering as well but based on my experience it doesn't work well, so if i were you i would go with akka cluster and quartz, so you will get the benefits of both worlds. But to summarize i would say it depends mostly on your requirements etc.