instcode / Flake

A network service for generating unique 64bit IDs at scale

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flake is inspired by FormSpring Flake which is then inspired by Twitter's Snowflake ^^

Usage

Flake supports HTTP and Thrift protocol to generate unique ids.

HTTP:

/worker-id
/id
/stats
/timestamp

Thrift:

service Flake {
  i64 get_worker_id()
  i64 get_timestamp()
  i64 get_id()
  string get_stats()
}

Speed

Flake is quite fast with Thrift protocol. You may want to run the benchmark.py to measure the performance of Flake.

About

A network service for generating unique 64bit IDs at scale


Languages

Language:Python 97.3%Language:Shell 2.7%