7. HTTPの例
RPC方式でレコードを格納 RPC方式でレコードを検索
POST /rpc/set HTTP/1.1 POST /rpc/get HTTP/1.1
Content-Length: 22 Content-Length: 10
Content-Type: text/tab-separated-values Content-Type: text/tab-separated-values
key japan key japan
value tokyo
HTTP/1.1 200 OK
HTTP/1.1 200 OK Content-Length: 12
Content-Length: 0 Content-Type: text/tab-separated-values
value tokyo
RESTful方式でレコードを格納 RESTful方式でレコードを検索
PUT /japan HTTP/1.1 GET /japan HTTP/1.1
Content-Length: 5
Content-Type: application/octet-stream HTTP/1.1 200 OK
Content-Length: 5
tokyo Content-Type: application/octet-stream
HTTP/1.1 201 Created tokyo
Content-Length: 0
9. ネットワーク層の構成
listen register the
server socket
accept
Event Notifier
detect new Task Queue
connection deposit observed objects
observed events
queue
undo add
wait signal condition
variable
withdraw wait
notified objects
notified events consume each
request
signal
process worker thread
register a request
from a client process
signal worker thread
process each
request
reuse or discard
the connection process
signal worker thread