6.824 CRAQ lecture note(Pending for updated)
FaRM (To be updated...)
Introduce
Microsoft’s main memory distributed computing platform, FaRM can provide distributed transactions with serializability, high performance, durability, and high availability using RDMA and a new, inexpensive approach to providing non-volatile DRAM.
NVRAM
- Strategy to become non-volatile:
- Using battery as back-up power, once the electric power fails, the system goes with battery and do all context saving work then shut down
- Note: This scheme is just helpful when encounters power failure, is not applicable for hardware/ software failure. –Because otherwise the system just shut down directly.
Optimistic Concurrency Control
For a optimistic lock, we have
1 | Xaction begin |
Before commit transaction to storage, system need to verify the validation of the transaction. If success, then commit, else abort all the operation related to transaction.
1 | tx.create() |
Transaction Management
Refer to the above figures about server layout and OCC commit protocol. Let’s talk about FaRM’s transaction management. FaRM uses OCC and 2PC to achieve its serializability.
2PC strategy
- Read without lock, read(& value, &version)
- use one-side RDMA to read
- Lock the revised data
- primary polling for data which is (use DRMA to poll)
- locked, so send reject
- VERS changed, then send reject
- else, then set the lock and send yes.( To avoid racing, use CHECK&SET atomic operation here)
- primary polling for data which is (use DRMA to poll)
- do validation for those no changed shard
- To check if version changed or locked]
- Commit
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.