<commit_before># Icicle [![Build Status](https://travis-ci.org/intenthq/icicle.svg?branch=master)](https://travis-ci.org/intenthq/icicle) [![Join the chat at https://gitter.im/intenthq/icicle](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/intenthq/icicle)
**A distributed, k-sortable unique ID generation system using Redis and Lua.**

Icicle is a project to generate 64-bit, k-sortable unique IDs in a distributed fashion by using Redis' Lua scripting.

Implementations of Icicle could be written in any language using just a [Redis client library](http://redis.io/clients) and [the Lua script](icicle-core/src/main/resources/id-generation.lua).

[Read more about Icicle on the Intent HQ Engineering blog](http://engineering.intenthq.com/2015/03/icicle-distributed-id-generation-with-redis-lua/).

## Using Icicle

## Setup Your Redis Nodes

You need to have some Redis nodes available and running to use with Icicle. They must be running Redis 3.0+ to have support for running Lua scripts. We recommend running at least 2 Redis nodes, allowing for redundancy and better performance.

Once you have the Redis servers up and running, **you must assign a logical shard ID to each Redis instance**. This is a unique number between 0 and 1023 (inclusive) that is assigned to each node to prevent duplicate IDs:<commit_msg>Improve upgrade notices in README for #18.<commit_after># Icicle [![Build Status](https://travis-ci.org/intenthq/icicle.svg?branch=master)](https://travis-ci.org/intenthq/icicle) [![Join the chat at https://gitter.im/intenthq/icicle](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/intenthq/icicle)
**A distributed, k-sortable unique ID generation system using Redis and Lua.**

Icicle is a project to generate 64-bit, k-sortable unique IDs in a distributed fashion by using Redis' Lua scripting.

Implementations of Icicle could be written in any language using just a [Redis client library](http://redis.io/clients) and [the Lua script](icicle-core/src/main/resources/id-generation.lua).

[Read more about Icicle on the Intent HQ Engineering blog](http://engineering.intenthq.com/2015/03/icicle-distributed-id-generation-with-redis-lua/).

> **Icicle v1.x users:** There are some important breaking changes in v2.x! Please [read the release notes](https://github.com/intenthq/icicle/releases/tag/v2.0.0) for more information.

## Using Icicle

## Setup Your Redis Nodes

You need to have some Redis nodes available and running to use with Icicle. **Icicle works on Redis >= v2.6 as it requires Lua support.** Redis 3.x is supported and tested. We recommend running _at least_ 2 Redis nodes, allowing for redundancy and better performance.

Once you have the Redis servers up and running, **you must assign a logical shard ID to each Redis instance**. This is a unique number between 0 and 1023 (inclusive) that is assigned to each node to prevent duplicate IDs:
{'fraction_non_alphanumeric': 0.10171821305841924, 'fraction_numerical': 0.015120274914089347, 'mean_word_length': 4.752964426877471, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 11, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1708413', 'n_tokens_mistral': 914, 'n_tokens_neox': 866, 'n_words': 337}