定制 jwarkentin/flaky 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jwarkentin/flaky

最新稳定版本:v0.0.9

Composer 安装命令:

composer require jwarkentin/flaky

包简介

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

README 文档

README

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

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. 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:

More specific to Elasticsearch, see:

API

统计信息

  • 总下载量: 25.3k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 4
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 0
  • Forks: 1
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-09-12