4 ms·
Ask HN: How to get stateful behavior in a stateless distributed environment?
In the past I worked a lot with standalone applications that could handle events such as OnChange, in which the change of an internal variable or system state could trigger an action.
Now, with a distributed architecture I want to know the best practices on handling events. I have read about Observer Pattern, PubSub, but my point goes beyond. Imagine, for example, a system in which a microservice must be updated when a value is changed on the database.
Also this is a question about real time values in a stateless architecture. When you need to store current states of the system in a database, you want other parts of the system to watch this database for changes. How to do that in a efficient way?