-
Notifications
You must be signed in to change notification settings - Fork 1
Architecture
Kaiyang Lv(Kevin Lui) edited this page Jun 6, 2014
·
3 revisions


- Client call get(1)
- After serialization, pack the message as a TxRequest
- Call execTx, send TxRequest to server
- Server handles it and return the value
- Begin TX
- Client call get(1),put(1,2),put(2,3)
- After Serialization, pack the message as a TxRequest
- Commit(&SnStoreResults)
- Call execTx, send TxRequest to server
- Server handles it and get the value from SnStoreResults

- Consists of Workers
- Each worker has a queue of operation requests and a thread
- Worker fetch operation request and handle it
- Server deserializate the TxRequest and split the request to corresponding thread operation queues
- (Transaction)Server get the global lock until the dispatch is done.
- If the queue is empty, wake up the thread to handle the request
- The thread keeps handling the request until the queue is empty, then it sleeps.
- Server combines the returned value to client.
- get(int key)
- put(int key,string value)
- getRange(int min, int max)
- beginTx()
- commit(&)
Communication through queue(shared memory)
Shared memory guarantee the order
Tag the request with increasing number(for each worker)
Worker handle request with a sliding window