DSIRNLP #4 / Twitterのsnowflakeについて
ID生成の性能も結構大事
•例:1つのID生成に1msかかるとした場合、ID生
成処理にどれくらい時間がかかる?
•Webサイト10億ページ
the number of individual web pages out there is growing by several billion pages per day.
(at 2008. via http://googleblog.blogspot.jp/2008/07/we-knew-web-was-big.html)
→約11日
•Webサイト240万ページ
日本語wikipediaの総項目数. via http://ja.wikipedia.org/wiki/Wikipedia:
%E5%85%A8%E8%A8%80%E8%AA%9E%E7%89%88%E3%81%AE
%E7%B5%B1%E8%A8%88
→約40分
4
DSIRNLP #4 / Twitterのsnowflakeについて
どんな風にIDを生成する?
•RFC 4122 “A Universally Unique IDentifier(UUID)”
8
ver. description
1 The time-based version specified in this document.
2 DCE Security version, with embedded POSIX UIDs.
3
The name-based version specified in this document that uses
MD5 hashing.
4
The randomly or pseudo-randomly generated version specified
in this document.
5
The name-based version specified in this document that uses
SHA-1 hashing.