All Projects → jchook → Uuid Random

jchook / Uuid Random

Licence: mit
Fastest UUID with cryptographic PRNG for JS

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Uuid Random

Ble
✨Android BLE基础操作框架,基于回调,操作简单。包含扫描、多连接、广播包解析、服务读写及通知等功能。
Stars: ✭ 1,183 (+1259.77%)
Mutual labels:  uuid
Uuid Creator
A Java library for generating and handling RFC-4122 UUIDs.
Stars: ✭ 78 (-10.34%)
Mutual labels:  uuid
Echo360
Commandline tool for automated downloads of echo360 videos hosted by university
Stars: ✭ 81 (-6.9%)
Mutual labels:  uuid
Testing Distributed Systems
Curated list of resources on testing distributed systems
Stars: ✭ 1,187 (+1264.37%)
Mutual labels:  distributed-systems
Rsf
已作为 Hasor 的子项目,迁移到:http://git.oschina.net/zycgit/hasor
Stars: ✭ 77 (-11.49%)
Mutual labels:  distributed-systems
Kbfs
Keybase Filesystem (KBFS)
Stars: ✭ 1,218 (+1300%)
Mutual labels:  distributed-systems
Cause
An EDN-like CRDT (Causal Tree) for Clojure & ClojureScript that automatically tracks history and resolves conflicts.
Stars: ✭ 68 (-21.84%)
Mutual labels:  distributed-systems
Disel
Distributed Separation Logic: a framework for compositional verification of distributed protocols and their implementations in Coq
Stars: ✭ 85 (-2.3%)
Mutual labels:  distributed-systems
Hotelsystem
🏨TopView工作室一轮考核项目:一个酒店管理系统,提供查看房间,对房间进行模糊查询,预订房间,个人信息管理,房间和酒店信息管理(管理员)等功能,后台使用Java,tomcat,mysql,servlet,jsp实现,没有使用任何框架
Stars: ✭ 78 (-10.34%)
Mutual labels:  uuid
Uuid Shortener
A simple RFC 4122 UUID shortener library. Change your long 36 chars long ID into it's shorter equivalent.
Stars: ✭ 81 (-6.9%)
Mutual labels:  uuid
Go Craq
CRAQ (Chain Replication with Apportioned Queries) in Go
Stars: ✭ 75 (-13.79%)
Mutual labels:  distributed-systems
Harvey
A distributed operating system
Stars: ✭ 1,204 (+1283.91%)
Mutual labels:  distributed-systems
Microdot
Microdot: An open source .NET microservices framework
Stars: ✭ 1,222 (+1304.6%)
Mutual labels:  distributed-systems
Awesome System For Machine Learning
A curated list of research in machine learning system. I also summarize some papers if I think they are really interesting.
Stars: ✭ 1,185 (+1262.07%)
Mutual labels:  distributed-systems
Teler
Real-time HTTP Intrusion Detection
Stars: ✭ 1,248 (+1334.48%)
Mutual labels:  ids
Gnes
GNES is Generic Neural Elastic Search, a cloud-native semantic search system based on deep neural network.
Stars: ✭ 1,178 (+1254.02%)
Mutual labels:  distributed-systems
Sfs
The distributed object storage server used by PitchPoint Solutions to securely store billions of large and small files using minimal resources. Object data is stored in replicated volumes implemented like Facebooks Haystack Object Store. Object metadata which essentially maps an object name to a volume position is stored in an elasticsearch index.
Stars: ✭ 78 (-10.34%)
Mutual labels:  distributed-systems
Docker Superset
Repository for Docker Image of Apache-Superset. [Docker Image: https://hub.docker.com/r/abhioncbr/docker-superset]
Stars: ✭ 86 (-1.15%)
Mutual labels:  distributed-systems
Dolphin
Distributed API Gateway
Stars: ✭ 84 (-3.45%)
Mutual labels:  distributed-systems
Go2p
Simple to use but full configurable p2p framework
Stars: ✭ 80 (-8.05%)
Mutual labels:  distributed-systems

uuid-random

MIT Licence Stable

Generate RFC-4122 compliant random UUIDs (version 4) with better statistical dispersion than Math.random().

Install

npm i uuid-random

Or download the latest release.

Features

Compatibility

Compatible with almost all versions of:

  • Node
  • Babel
  • TypeScript
  • Web browsers

Performance

The included benchmark.js as well as independent benchmarks rank this library as the fastest pure JS UUID v4 generator available with cryptographically secure PRNG— almost 20x faster than the most popular library (using latest NodeJS).

npm package performance
portable-uuid 354k ops/sec
uuid 474k ops/sec
id128 6.0M ops/sec
uuid-random (this) 9.7M ops/sec

Results above generated on a 4.20GHz Intel i7-7700K with Node v12.18.0

Why use UUID?

Universally Unique IDentifiers transcend many constraints of traditional incremental integer IDs, especially in distributed systems. In UUID version 4, we essentially generate a random 128-bit value.

We do trade guaranteed uniqueness for extremely probable uniqueness (you would need to do-loop uuid() at max speed for 73,067 years for a 50% chance of one collision). But for that slight cost, we may now generate valid, unique, persistent IDs on any node of a distributed system (e.g. intermittently offline or high-latency clients).

Note, if you plan to use UUIDs for a new project, depending on your requirements, you may consider a more recent standard that addresses some of the shortcomings of UUID, such as flake-id, nanoid, cuid, or ulid.

Example Usage

Babel

import uuid from 'uuid-random';
uuid(); // 'f32dc9ae-7ca8-44ca-8f25-f258f7331c55'

Node

var uuid = require('uuid-random');
uuid(); // '0b99b82f-62cf-4275-88b3-de039020f14e'

Browser

<script src="uuid-random.min.js"></script>
<script>
  uuid(); // 'b96ab5e6-f1e8-4653-ab08-4dd82ea65778'
</script>

Validate a UUID v4 String

uuid.test('0b99b82f-62cf-4275-88b3-de039020f14e'); // true

Generate Binary UUIDs

uuid.bin(); // <Buffer 41 db 10 54 b3 61 48 50 87 f1 2f 7b 08 a5 0f 06>

Contributing

Feel free to open an issue or submit a pull request.

License

MIT.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].