- Tatsuhiro Ujihisa
- http://ujihisa.blogspot.com/
- 非同期とは?
- スレッド、プロセス
- プロセス生成
require 'HTTP' | |
require 'UV' | |
module Sinachiku | |
@routes = { 'GET' => [], 'POST' => [] } | |
def self.route(method, path, opts, &block) | |
@routes[method] << [path, opts, block] | |
end | |
def self.do(r) | |
@routes[r.method].each {|path| |
require 'zlib' | |
module ConsistentHashr | |
@circle = {} | |
@number_of_replicas = 20 | |
## | |
# Computes a key | |
def self.hash_key(key) | |
Zlib.crc32("#{key}") |