Giter Site home page Giter Site logo

leaf-snowflake's Introduction

Leaf-snowflake

Last Modified: 2017-06-28

Introduction

Leaf-snowflake is a distributed,monotonic increase long-type integer ID maker.

Support nearly 1000+ leaf-snowflake servers to provide id services simultaneously.

Based on http://tech.meituan.com/MT_Leaf.html leaf-snowflake.

Steps:

  1. mvn package
  2. Set ${LEAF_HOME} environment variable
  3. Config leaf.yaml at ${LEAF_HOME}/conf
  4. Exec ${LEAF_HOME}/bin/start.sh
  5. Communicate to the RPC server and get the unique , monotonic increase ID like startClient() in /rpc/rpcClient.java shows,just for test!

Commond line tools

  1. List the content of a znode dir:

    /bin/leaf.py zktool list /leaf/server-forever

  2. Read the content of a znode:

    /bin/leaf.py zktool read /leaf/server-forever/172.21.0.190:2182-0000000008

Throughput capacity test

Cost 191 seconds with 200W absolutely monotonic increase Ids generated.

TPS: 1W+/sec for a single machine

Author

weizhenyi Github: https://github.com/weizhenyi

Getting help

Email: [email protected] QQ:632155186

leaf-snowflake's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.