conveyal / otpa-cluster

Cluster backend for otpa many-to-many queries.
0 stars 1 forks source link

Don't preserve internal state #31

Closed mattwigway closed 9 years ago

mattwigway commented 9 years ago

Akka will automatically restart an actor if an exception occurs. In general, this is good as it allow recovery, but the way the code is currently architected we keep internal state in actors. This may be impossible to avoid for the executive, but on the workers we could rethink how we maintain association with the executive and allow them to be restarted more easily. We could pass in an ActorRef to the executive on startup, for example, and then the executive (which we don't ever restart) could be sent a message by the worker manager saying "hello! I'm here! give me something to do!"

mattwigway commented 9 years ago

Fixed by removing internal state from SPTWorkers (see #32) and making executive and workermanager robust to errors.