This repository has been archived on 2026-05-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Alix von Schirp c774f8cb48 v1.0.0
- Readme.md: docker run syntax
- pom.xml: Change version to stable
2024-05-20 19:44:50 +02:00
2024-05-20 19:39:49 +02:00
2024-05-08 22:44:23 +02:00
2024-05-20 19:44:50 +02:00
2024-05-20 19:44:50 +02:00

SnowflakeService

A tool/microservice to centrally generate snowflake IDs.

GitHub License GitHub Issues or Pull Requests GitHub repo size GitHub Release

Acknowledgements

This utility uses:

Installation

  docker pull bootmediaalix/snowflakeservice
  docker run -e %{set required .env, see below} -p 9567:9567 -v /data/b00tload-services/snowflake:%{desired path on host} bootmediaalix/snowflakeservice

Containerless

A containerless installation is possible, although not supported. For development convenience the application base directory is located in ~/.b00tload-services/snowflake instead of /data/b00tload-services/snowflake. If you want to work containerless you are on your own.

Environment Variables

To run this project, you may add the following environment variables to your .env file

EPOCH - the starting time of the snowflake (defaults to 01.01.2024 12:00 AM)

MACHINE_ID_BITS - the amount of bits used for the machine ID

SEQUENCE_BITS - the amount of bits used for the sequence counter

MACHINE_ID - the ID of the generator

API Reference

Get an ID

  GET /generate

Response example:

{
    "id": "50990430426234880"
}

Maintainer

License

GNU GPL v3

Support

For support, open a ticket or email me at alix (at) ja-lol-ey (dot) de.

Description
A tool/microservice to centrally generate snowflake IDs. Can be run in a distributed system.
Readme GPL-3.0 62 KiB
1.1.0 Latest
2024-06-23 00:29:24 +02:00
Languages
Java 96%
Dockerfile 4%