{"action":"opened","issue":{"url":"https://api.github.com/repos/chenxijywc/chenxi-notes/issues/5","repository_url":"https://api.github.com/repos/chenxijywc/chenxi-notes","labels_url":"https://api.github.com/repos/chenxijywc/chenxi-notes/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/chenxijywc/chenxi-notes/issues/5/comments","events_url":"https://api.github.com/repos/chenxijywc/chenxi-notes/issues/5/events","html_url":"https://github.com/chenxijywc/chenxi-notes/issues/5","id":393795774,"node_id":"MDU6SXNzdWUzOTM3OTU3NzQ=","number":5,"title":"Twitter的snowflake算法","user":{"login":"chenxijywc","id":8213773,"node_id":"MDQ6VXNlcjgyMTM3NzM=","avatar_url":"https://avatars1.githubusercontent.com/u/8213773?v=4","gravatar_id":"","url":"https://api.github.com/users/chenxijywc","html_url":"https://github.com/chenxijywc","followers_url":"https://api.github.com/users/chenxijywc/followers","following_url":"https://api.github.com/users/chenxijywc/following{/other_user}","gists_url":"https://api.github.com/users/chenxijywc/gists{/gist_id}","starred_url":"https://api.github.com/users/chenxijywc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenxijywc/subscriptions","organizations_url":"https://api.github.com/users/chenxijywc/orgs","repos_url":"https://api.github.com/users/chenxijywc/repos","events_url":"https://api.github.com/users/chenxijywc/events{/privacy}","received_events_url":"https://api.github.com/users/chenxijywc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-24T01:49:25Z","updated_at":"2018-12-24T01:49:25Z","closed_at":null,"author_association":"OWNER","body":"snowflake是Twitter开源的分布式ID生成算法，结果是一个long型的ID。其核心思想是：使用41bit作为毫秒数，10bit作为机器的ID（5个bit是数据中心，5个bit的机器ID），12bit作为毫秒内的流水号（意味着每个节点在每毫秒可以产生 4096 个 ID），最后还有一个符号位，永远是0。具体实现的代码可以参看https://github.com/twitter/snowflake。"}}
{"actor":{"display_login":"chenxijywc"}}