![]() |
CPS 512 (Duke University) Distributed * Systems | ![]() |
|||||
|
|||||||
For Lab #3 you are asked to extend KVStore and KVClient to implement serializable ACID transactions using two-phase locking (2PL) and two-phase commit (2PC). Each transaction executes within a single application actor that is a client of KVStore (e.g., within a RingServer). So transactions are serial within each client actor, but multiple client actors may execute transactions concurrently.
We continue to assume that KVStore actors do not fail. Given that assumption, the D property is easy: no changes to the storage scheme are required to make transactions "durable". Also, this assumption makes 2PC easier, because it is unnecessary to deal with failure of a transaction participant.
Your transaction implementation should use the client-side caches implemented in KVClient, and it must keep the caches consistent.
Here are a few points to consider as you design your implementation.
Note: You may find useful to use Akka schedulers to manage sessions (http://doc.akka.io/docs/akka/snapshot/scala/scheduler.html). The scheduler allows you to schedule a message to be sent to an actor at a specified time or after a specified delay.