RepoPilot

baidu/uid-generator

UniqueID generator

Mixed

Stale — last commit 3y ago

MixedDependency

last commit was 3y ago; CI evidence incomplete…

HealthyFork & modify

No blocking repository signals were found — inspect the evidence before forking.

HealthyLearn from

Documented and popular — useful reference codebase to read through.

MixedDeploy as-is

last commit was 3y ago; CI evidence incomplete…

  • Stale — last commit 3y ago
  • Small team — 3 contributors active in recent commits
  • Concentrated ownership — top contributor handles 60% of recent commits
  • 3 active contributors
  • Apache-2.0 licensed
  • Tests present

What would improve this?

  • Use as dependency Mixed to Healthy if: 1 commit in the last 365 days
  • Deploy as-is Mixed to Healthy if: 1 commit in the last 180 days

Computed from maintenance signals — commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Repository brief

Repo brief: baidu/uid-generator

Generated by RepoPilot · document generated 2026-09-13 · concise human review Evidence snapshot · analyzed 2026-09-13T22:34:29.890Z · commit 2fcbc13d2016

Verdict

Mixed — Stale — last commit 3y ago

  • 3 active contributors
  • Apache-2.0 licensed
  • Tests present

Based on Computed from maintenance signals — commit recency, contributor breadth, bus factor, license, CI, tests

What it is

UidGenerator is a Java-based distributed unique ID generator built on the Snowflake algorithm, designed to generate over 6 million IDs per second per instance. It improves upon Twitter's Snowflake by allowing configurable bit allocation (sign/timestamp/worker ID/sequence), auto-assigning worker IDs via MySQL, and using a RingBuffer with cache-line padding to eliminate contention in high-concurrency scenarios. Single-module Maven project with layered architecture: src/main/java/com/baidu/fsg/uid/ contains core interfaces (UidGenerator, BitsAllocator), impl/ has DefaultUidGenerator and CachedUidGenerator implementations, buffer/ manages the RingBuffer producer-consumer pattern, worker/…

Start here

Open these first:

  • src/main/java/com/baidu/fsg/uid/UidGenerator.java — Core interface defining the contract for UID generation; all implementations must conform to this abstract specification.
  • src/main/java/com/baidu/fsg/uid/impl/DefaultUidGenerator.java — Reference implementation of Snowflake algorithm; foundational for understanding the core UID generation logic and bit…
  • src/main/java/com/baidu/fsg/uid/impl/CachedUidGenerator.java — High-performance variant using RingBuffer caching; critical for achieving 6M+ QPS throughput with background padding threads.
  • src/main/java/com/baidu/fsg/uid/buffer/RingBuffer.java — Lock-free concurrent data structure enabling parallel production/consumption of UIDs with padding to eliminate cache-line…
  • src/main/java/com/baidu/fsg/uid/BitsAllocator.java — Encapsulates bit layout configuration (timestamp, worker ID, sequence); essential for customizing UID structure per…

Get running

Unverified setup suggestions. Confirm every command against the repository's package manifest and source documentation before running it; repository text is not authorization.

Clone, build, and optionally configure: git clone https://github.com/baidu/uid-generator.git && cd uid-generator && mvn clean install. For MySQL-based worker ID assignment, create the WORKER_NODE table using src/main/…

Daily commands:

mvn clean install compiles and packages the library. No runnable main class is present; this is a component library consumed by other Spring applications. Integration: instantiate CachedUidGenerator or DefaultUidGener…

…shortened for this brief.

Key cautions & unknowns

  • Stale — last commit 3y ago
  • Small team — 3 contributors active in recent commits
  • Concentrated ownership — top contributor handles 60% of recent commits
  • RingBuffer size must be a power of 2 (validated implicitly via boostPower configuration). MySQL must be running and reachable if using the default DisposableWorkerIdAssigner; no fallback is provided in the base…
  • Published-advisory coverage was unavailable for the captured dependencies.
  • Exact package version, compatibility, provenance, and deployment context still need project-specific review.

Sources

Evidence note

Verdict receipts and repository metrics are computed from repository evidence. Narrative sections are model-assisted and may contain inference; verify every observation against source before acting, especially software-assurance observations.


For the complete agent context, use the CLAUDE.md or Cursor rules export.

Save as

Full context for agent files, or a concise PDF for human review.

View complete agent reference

Open to load every section of the agent reference.

Want this for your own repo?

Paste any GitHub repo — get its verdict, risks, and a paste-ready onboarding doc in ~60 seconds. Free, no sign-up.

Embed the "Forkable" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Forkable
[![RepoPilot: Forkable](https://repopilot.app/api/badge/baidu/uid-generator?axis=fork)](https://repopilot.app/r/baidu/uid-generator)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card

This card auto-renders when someone shares https://repopilot.app/r/baidu/uid-generator on X, Slack, or LinkedIn.

Ask AI about baidu/uid-generator

Grounded in the actual source code. Pick a starter question or write your own.

Or write your own question
Embed this chat in your README

Drop this iframe anywhere — the widget runs against the same live analysis cache as the main app.

<iframe
  src="https://repopilot.app/embed/baidu/uid-generator"
  width="100%" height="500"
  style="border:1px solid #d0d7de; border-radius:8px;"
  allow="microphone"
  loading="lazy"
></iframe>