โ ๏ธ This post links to an external website. โ ๏ธ
How Ash calculations work and ways to deal with missing or uncertain data.
We are Mr. Chaos in Mission Control. Our client interface lets us make all sorts of poor decisions. The application is relying on Ash resources to protect itself from our behavior.
Letโs add a bit more chaos. A superhero is no longer just a record in a database. A superhero is an actor. Superheroes fight crime and report back metadata, such as their current health. We optimistically save our requests to a superhero. Those requests notify the actor. You are dispatched. Go recover. Whatever the instruction is, the actor receives it and reacts inside its own process.
After a superhero is dispatched, they head to their assignment and fight crime. Fighting crime reduces health. The superhero always keeps us updated about every change to their health. Over time they win or lose the assignment. While all of this is happening, the actor reports back each change and, when the assignment finishes, the actor reports the final result.
Before a superhero terminates, they tell us they have lost the current battle and they will shut down gracefully. However, we are Mr. Chaos, and we now have a secret command that can terminate a superhero at any time, shutting down the actor immediately and without ceremony.
If a superheroโs health reaches zero, or if we decide their time is up, the actor stops. A terminated superhero cannot be regenerated.
continue reading on www.joekoski.com
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.