blacktip alternatives and similar packages
Based on the "Database" category.
Alternatively, view blacktip alternatives based on common mentions on social networks and blogs.
-
erd
Translates a plain text description of a relational database schema to a graphical entity-relationship diagram. -
persistent-redis
Persistence interface for Haskell allowing multiple storage methods. -
acid-state
Add ACID guarantees to any serializable Haskell data structure -
postgresql-simple
Mid-level client library for accessing PostgreSQL from Haskell -
HDBC-session
This repository includes a joined query generator based on typefull relational algebra, and mapping tools between SQL values list and Haskell record type. -
esqueleto
Bare bones, type-safe EDSL for SQL queries on persistent backends. -
hw-kafka-client
Kafka client for Haskell, including auto-rebalancing consumers -
groundhog
This library maps datatypes to a relational model, in a way similar to what ORM libraries do in OOP. See the tutorial https://www.schoolofhaskell.com/user/lykahb/groundhog for introduction -
mysql-simple
A mid-level client library for the MySQL database, intended to be fast and easy to use. -
postgresql-simple-migration
PostgreSQL Schema Migrations for Haskell -
vcache
large, persistent, memcached values and structure sharing for Haskell -
direct-sqlite
Low-level binding to SQLite3. Includes UTF8 and BLOB support. -
vcache-trie
large, persistent, memcached values and structure sharing for Haskell -
dbmigrations
A library for the creation, management, and installation of schema updates for relational databases. -
haskelldb
A library for building re-usable and composable SQL queries. -
postgresql-tx
[Moved to: https://github.com/Simspace/postgresql-tx] -
postgresql-typed
Haskell PostgreSQL library with compile-time type inference -
postgresql-orm
An Haskell ORM (Object Relational Mapping) and migrations DSL for PostgreSQL. -
ampersand
Build database applications faster than anyone else, and keep your data pollution free as a bonus. -
persistent-database-url
Parse DATABASE_URL into configuration types for Persistent
InfluxDB - Power Real-Time Data Analytics at Scale
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of blacktip or a related project?
README
Blacktip
[](blacktip.jpg "Blacktip Shark")
Blacktip is a k-ordered unique id service and a clone of Boundary's Flake.
Examples
import Database.Blacktip
wirelessConfig :: Config
wirelessConfig = defaultConfig { interface = IName "wlan0" }
main = do
result <- generateUniqueId wirelessConfig
case result of
Left NoInterfaceError -> error "fack"
Right uid -> putStrLn (show uid)
Benchmarks
Blacktip
[](bench.png "Benchmark results, Blacktip is faster than Flake")
Flake
([email protected])11> flake_harness:timed_generate(100000).
src/flake_harness.erl:33:<0.75.0>: generating ids: 0.272 s
Exceptional cases / Warnings
If you care about performance at all...
Don't pass the interface via the IName
string. Fetch it yourself and put it in the config as an NIInterface
.
I wrote getInterfaceByName
for this purpose.
This is a singleton service, ONE INSTANCE PER SERVER/MAC ADDRESS
Do not embed this unless:
You don't care about globally unique identities (then why do you need this?)
You can guarantee there will be one instance of this running per server / MAC address.
System time
If system time flows backwards (this can happen), Database.Blacktip.Types.ArrowOfTimeError
will be thrown.
This possibility could be eliminated by making an FFI wrapper for the monotonic system clock.
Sequence bounds checking
Currently there's no bounds checking on sequence. We start at 0 on a 16-bit signed integer. We're getting ~1500 uids per millisecond, we would need to exceed 32,767 (or 65,535 if we let negative numbers fly). We could flip it over to a Word16, which would at least eliminate the weirdness of negative sequence numbers but doesn't change anything at the bit level.
Possible solution would be to add bounds checking and yield. MVar has fairness and queue-like properties so this is a reasonable solution. For now, not a realistic possibility.
Timestamp file doesn't exist
Following the convention of existing implementations, we default the timestamp to 0 if there is no timestamp file at the location specified in the Database.Blacktip.Types.Config
passed to generateUniqueId
.
Timestamp file contains empty bits
Seems to be an artifact of something criterion (the benchmarks) does. Can't reproduce outside that, so defaulting timestamp to 0 when that happens.