Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GUI recommandations for eventual consistency?

When using distributed and scalable architecture, eventual consistency is often a requirement.

Graphically, how to deal with this eventual consistency?

Users are used to click save, and see the result instantaneously... with eventual consistency it's not possible.

How to deal with the GUI for such scenarios?

Please note the question applies both for desktop applications and web applications.

PS: I'm working with the Microsoft platform, but I imagine the question applies to any technology...

like image 674
Steve B Avatar asked Sep 06 '11 07:09

Steve B


People also ask

How do you achieve eventual consistency in Microservices?

Eventual consistency can be achieved by asynchronous and event-driven communication between microservices via messages and events brokers. Going back to the example we explained earlier. Every action in the process is basically an event that will be pushed to a certain queue.

How is eventually consistency important in distributed model?

Eventual Consistency is a guarantee that when an update is made in a distributed database, that update will eventually be reflected in all nodes that store the data, resulting in the same response every time the data is queried.


1 Answers

A Task Based UI fits this model great. You create and execute tasks from the UI. You can also have something like a task status monitor to show the user when a task has executed.

Another option is to use some kind of pooling from the client. You send the command, and pool from the client until the command completed and the new data is available. You will have a delay in some cases from when the user presses save to when he will see the new record, but in most cases it should be almost synchronous.

Another (good?) option is to assume/design commands that don't fail. This is not trivial but you can have a cache on the client and add the data from the command to that cache and display it to the user even before the command has been executed. If the command fails for some unexpected situation, well then just design a good "we are sorry" message for misleading the user for a few seconds.

You can also combine the methods above.

Usually eventual consistency is more of a business/domain problem, and you should have your domain experts handle it.

like image 84
Iulian Margarintescu Avatar answered Sep 29 '22 02:09

Iulian Margarintescu