There are major differences in the requirements for software running on server systems, PC clients, tablets, and phones. Even on office PCs, software can assume a continuous runtime of some ours during working days. But this is not the case for tablets and phones. Also it is not common that someone maintains a device inventory at home to keep the data in sync. Furthermore it is not accepted that touch screens block even for a second. It is better to show outdated information than to wait with a frozen screen on a network connection.
The problems can be solved by using a multi-threaded software architecture with at minimum two threads: one for implementing the model view control functionality, and another for network requests and database transactions. Transactions are necessary to keep consistency, because all threads and operations may break suddenly by switching power off.
Runtime can also not be forced, because the battery life time has to be as long as possible.
On a technical level local inconsistency problems are solved by using the database API, but there are even harder problems in multi-threaded programming.
To show how thread synchronization problems can be solved, we revisit two at the first view not correlated concepts from the past ...