Globally distributed database that automatically shards data across many sets of Paxos state machines in datacenters spread all over the world. Replication is used for global availability and geographic locality; clients automatically failover between replicas. It automatically migrates data between machines to balance load and during failures.
Following are some of the points to consider while designing and developing solutions involving concurrent processing.
- Identify independent computations using techniques like task partitioning and data partitioning.
High level sequence of steps which can be followed to design/develop concurrent processes
- Start with a well tuned and fully functional serial processing design/code to solve the problem.
In addition to race conditions, the second challenge in developing concurrent processing is deadlocks and they occur when the processes running concurrently need access to more than one resource. For e.g. if there are two resources R1 & R2 which will be accessed by two concurrent processes A & B,
Lets assume process A acquired resource R1
OS swaps processes A to start executing process B and processes B acquired resource R2
Inherently concurrent processing will involve shared resources like memory and will lead to race conditions. A simple example would be an accumulator variable which needs to be read by all the processes running concurrently, adding some value to it and storing back the result. The race condition occurs when