You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -26,9 +30,9 @@ The library has developed a dual schema: 64-bit unique identity to be used withi
26
30
27
31
The k-ordered value consists of time-stamp with millisecond resolution (50-bit) that is used to roughly sort events. The time-stamp ensures distinct sorting within virtual machine where system clock is controlled by operation system. A locally monotonic padding (14-bits) prevents the collisions (Note: 14-bits allows to have about 16K allocations per millisecond).
28
32
29
-
The time-stamp based sorting fails on distributed systems unless it implements precises time synchronization protocol. Therefore, it was decided to uses location aspect (node fingerprint) as component of k-ordered value. This component allows to keep ordering consistent even if clocks on other node is skewed. The developed schema allows to control the quality of the ordering (precision) depending on the length of _neighborhood interval_. The neighborhood interval is a time span where the location has higher priority then time.
33
+
The time-stamp based sorting fails on distributed systems unless it implements precises time synchronization protocol. Therefore, it was decided to uses location aspect (node fingerprint) as component of k-ordered value. This component allows to keep ordering consistent even if clocks on other node is skewed. The developed schema allows to control the quality of the ordering (precision) depending on the length of _neighborhood interval_. The neighborhood interval is a time span where the location has higher priority then time. The usage of this time interval relaxes a clock synchronization requirements while preserving an ordering.
30
34
31
-
The library represents k-ordered values as tuples but implements binary and url friendly base64 encoding. The serialization protocol has been changed after library version `1.2.0`. New serialization improves allocation performance of k-order values. It uses Erlang OTP/18 feature `erlang:unique_integer(...)` to generate locally monotonic value. The library allocates about 13M k-ordered values per second on reference hardware.
35
+
The library represents k-ordered values as tuples but implements binary and url friendly encoding similar to base64. The serialization protocol has been changed after library version `1.2.0`. New serialization improves allocation performance of k-order values. It uses Erlang OTP/18 feature `erlang:unique_integer(...)` to generate locally monotonic value. The library allocates about 13M k-ordered values per second on reference hardware.
32
36
33
37
### 64-bit, local
34
38
@@ -101,17 +105,19 @@ uid:encode(B).
101
105
102
106
%%
103
107
%% encode value to base64
104
-
%% <<"AGA5igPrJzJ7aYAB">>
108
+
%% <<".5.tXVEf8n8vPN.0">>
105
109
uid:encode64(B).
106
110
```
107
111
108
112
## How To Contribute
109
113
110
114
The library is Apache 2.0 licensed and accepts contributions via GitHub pull requests:
111
115
112
-
* Fork the repository on GitHub
113
-
* Read build instructions
114
-
* Make a pull request
116
+
1. Fork it
117
+
2. Create your feature branch (`git checkout -b my-new-feature`)
118
+
3. Commit your changes (`git commit -am 'Added some feature'`)
119
+
4. Push to the branch (`git push origin my-new-feature`)
120
+
5. Create new Pull Request
115
121
116
122
The build process requires [Erlang/OTP](http://www.erlang.org/downloads) version 19.0 or later and essential build tools.
117
123
@@ -156,9 +162,4 @@ If you experience any issues with the library, please let us know via [GitHub is
156
162
157
163
## License
158
164
159
-
Copyright 2012 Dmitry Kolesnikov
160
-
161
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
162
-
163
-
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
0 commit comments