Our great sponsors
-
mudderjs
Lexicographically-subdivide the “space” between strings, by defining an alternate non-base-ten number system using a pre-defined dictionary of symbol↔︎number mappings. Handy for ordering NoSQL keys.
I have solved this problem for my own purposes — no claims of grand scalability or high efficiency — by storing indices or "ranks" of items as strings (Postgres TEXT) using a library called mudderjs[0] and a thin wrapper around it[1]. Sorted lexicographically (in dictionary order) arbitrary-length strings have arbitrary precision. You can always find a string between any two strings; for instance, between "a" and "b" is "am" and between "a" and "ab" is "aam". You do have to have the entire ordered collection in scope to generate a new rank for an item, but reordering an item only requires updating one row and isn't subject to floating point precision.
[0] https://github.com/fasiha/mudderjs
[1] https://github.com/pubpub/pubpub/blob/master/utils/rank.ts
-
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.