Skip to content
Kaiyang Lv(Kevin Lui) edited this page Jun 6, 2014 · 3 revisions

Architecture

Client

Get etc

  1. Client call get(1)
  2. After serialization, pack the message as a TxRequest
  3. Call execTx, send TxRequest to server
  4. Server handles it and return the value

Transaction

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

Server

overview

  1. Consists of Workers
  2. Each worker has a queue of operation requests and a thread
  3. Worker fetch operation request and handle it

Detail

  1. Server deserializate the TxRequest and split the request to corresponding thread operation queues
  2. (Transaction)Server get the global lock until the dispatch is done.
  3. If the queue is empty, wake up the thread to handle the request
  4. The thread keeps handling the request until the queue is empty, then it sleeps.
  5. Server combines the returned value to client.

APIs

  1. get(int key)
  2. put(int key,string value)
  3. getRange(int min, int max)
  4. beginTx()
  5. commit(&)

Share Nothing

Coordinator vs. Worker

Communication through queue(shared memory)

Shared memory guarantee the order

Message passing

Tag the request with increasing number(for each worker)

Worker handle request with a sliding window

Clone this wiki locally