PHPackages                             jwarkentin/flaky - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jwarkentin/flaky

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jwarkentin/flaky
================

Module for generating short, fixed-length, sequential UUIDs ideal for indexing in various tree based structures

v0.0.9(9y ago)525.5k1[2 issues](https://github.com/jwarkentin/flaky/issues)1MITJavaScript

Since Sep 12Pushed 9y agoCompare

[ Source](https://github.com/jwarkentin/flaky)[ Packagist](https://packagist.org/packages/jwarkentin/flaky)[ RSS](/packages/jwarkentin-flaky/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (4)DependenciesVersions (4)Used By (1)

flaky
=====

[](#flaky)

Node.js module for generating short, fixed-length, sequential UUIDs ideal for indexing in various tree based structures. It creates IDs without coordination between servers/instances (even multiple instances on the same machine) that can be used confidently without collisions, while still being mostly sequential and always ascending. It is also resistant to potentially large backward time jumps of the system clock (the amount of tolerance depends on how long it takes you to generate 100,000 ids basically).

All Flaky IDs are created with a full 64 bits of data. Flaky also provides a lot of flexibility in terms of what base encoding you want to use and what character set to encode with. By default it will do base 64 encoding and use the standard character set.

Motivation
----------

[](#motivation)

I wanted a UUID generator that was designed for use with common database indexing techniques to provide the best performance for indexing and lookups, while also being efficient with space (i.e. short IDs). This is designed based on my understanding of how elasticsearch BlockTree indexing works as explained by [Mike McCandless](http://blog.mikemccandless.com/2014/05/choosing-fast-unique-identifier-uuid.html). It is loosely based on the concept of flake IDs. In my own benchmarks these IDs have proven to be faster and more efficient than the standard IDs assigned by Elasticsearch. It should work well with MySQL's InnoDB index format as well (though I haven't tested it).

To learn more about flake IDs see:

-
- There are some noteworthy comments on HN as well:
-
- "Use auto id or pick a good id" section at the bottom of the page:

More specific to Elasticsearch, see:

- elasticsearch [issue 5941](https://github.com/elastic/elasticsearch/issues/5941)
- elasticsearch [implementation](https://github.com/elastic/elasticsearch/blob/9c1ac95ba8e593c90b4681f2a554b12ff677cf89/src/main/java/org/elasticsearch/common/TimeBasedUUIDGenerator.java)

API
---

[](#api)

- [JavaScript](doc/JavaScript.md)
- [PHP](doc/PHP.md)

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~49 days

Total

3

Last Release

3472d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4642f684af77adcc7cf01763dbc775d785a1e951fbc79bec70e079dfcfc1e396?d=identicon)[jwarkentin](/maintainers/jwarkentin)

---

Top Contributors

[![jwarkentin](https://avatars.githubusercontent.com/u/1084024?v=4)](https://github.com/jwarkentin "jwarkentin (22 commits)")[![ev0rtex](https://avatars.githubusercontent.com/u/1640672?v=4)](https://github.com/ev0rtex "ev0rtex (1 commits)")[![oldDriver](https://avatars.githubusercontent.com/u/1439629?v=4)](https://github.com/oldDriver "oldDriver (1 commits)")

---

Tags

uuidflakeflakeid

### Embed Badge

![Health badge](/badges/jwarkentin-flaky/health.svg)

```
[![Health](https://phpackages.com/badges/jwarkentin-flaky/health.svg)](https://phpackages.com/packages/jwarkentin-flaky)
```

###  Alternatives

[ramsey/uuid

A PHP library for generating and working with universally unique identifiers (UUIDs).

12.6k729.6M3.8k](/packages/ramsey-uuid)[symfony/polyfill-uuid

Symfony polyfill for uuid functions

688359.3M85](/packages/symfony-polyfill-uuid)[symfony/uid

Provides an object-oriented API to generate and represent UIDs

610303.9M1.1k](/packages/symfony-uid)[webpatser/laravel-uuid

Laravel integration for webpatser/uuid - High-performance drop-in UUID replacements (15% faster than Ramsey). Provides Str macros, HasUuids trait, facades, and casts. RFC 4122/9562 compliant.

1.8k17.7M135](/packages/webpatser-laravel-uuid)[pascaldevink/shortuuid

PHP 7.4+ library that generates concise, unambiguous, URL-safe UUIDs

5941.8M16](/packages/pascaldevink-shortuuid)[emadadly/laravel-uuid

laravel uuid a simple, automatic UUID generator for any model based on Laravel.

117418.5k3](/packages/emadadly-laravel-uuid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
