SkillAgentSearch skills...

Snowflake

SnowFlake is a useful software package based on the open source SnowFlake algorithm created by RT-Thread.

Install / Use

/learn @alphazcc/Snowflake
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

SnowFlake

Chinese | English

1. Introduction

SnowFlake is a useful software package based on the open source SnowFlake algorithm created by RT-Thread.

Snowflake algorithm is an algorithm invented by Twitter. The main purpose is to solve the problem of how to generate ID in distributed environment.

Mandatory requirements for the distributed ID generation rule:

  • Globally unique;

  • It is essential that no duplicate ID numbers appear, since they are unique.

For more software package introduction, please refer to Detailed introduction.

1.1 Directory structure

The directory structure of the SnowFlake software package is as follows:

SnowFlake
├───docs 
│   ├───figures                   // Documents use pictures
│   │   api.md                    // API instructions
│   │   introduction.md           // Introduction document
│   │   principle.md              // Implementation principle
│   │   README.md                 // Document structure description
│   │   samples.md                // package sample
│   │   user-guide.md             // Instructions
│   └───version.md                // version
├───inc                           // header file
├───samples                       // sample code
│   └───snowflake_sample          // gets the ID sample code
├───src                           // source file
│   LICENSE                       // package license
│   README.md                     // Software package instructions
│   SConscript                    // RT-Thread default build script
│   snowflake.h                   // snowflake header file
│   snowflake_port.c              // snowflake_port source file
└───snowflake_port.h              // snowflake_port header file

1.2 License

The SnowFlake software package complies with the MIT license, see the LICENSE file for details.

1.3 Dependency

  • RT_Thread 3.0+

2. Get the software package

To use the SnowFlake software package, you need to select it in the RT-Thread package management. The specific path is as follows:

RT-Thread online packages
	tools packages  --->
		[*] Snowflake algorithm is a distributed ID generation algorithm
		[ ]   Enable snowflake samples 
              Version (latest)  --->

3. Use SnowFlake software package

  • For detailed description of the software package, please refer to Introduction

  • For detailed sample introduction, please refer to Sample Document

  • How to use from scratch, please refer to User Guide

  • For complete API documentation, please refer to API Manual

  • The working principle of the software package, please refer to Working Principle

  • More Detailed introduction documents are located in the /docs folder, Please check before using the package for development.

4. Matters needing attention

Note If you need to change the configuration, follow the precautions in introduction

5. Contact & Thanks

  • Maintenance: 2022alpha

  • Homepage: https://github.com/alphazcc/snowflake

  • Open Source Address: https://github.com/yitter/IdGenerator

View on GitHub
GitHub Stars4
CategoryDevelopment
Updated1y ago
Forks0

Languages

C

Security Score

70/100

Audited on Jun 21, 2024

No findings