js-db
stm-containers
js-db | stm-containers | |
---|---|---|
1 | 2 | |
5 | 62 | |
- | - | |
7.1 | 3.7 | |
6 months ago | 11 days ago | |
TypeScript | Haskell | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
js-db
-
Software Transactional Memory (1997)
I've been working on a JS database to support optimistic concurrency control. I did some research and arrived on 2 seemingly related concepts but from independent research lines. Software transactional memory in functional programming/Haskell land versus snapshot isolation in database research.
After reading them both, I asked this unanswered question on SO: https://stackoverflow.com/q/72084071/582917. My theory is that STM is the same as SI, but most SI database implementations don't just do value comparisons, but actually check a logical timestamp. This is probably done for performance reasons as databases handle larger pieces of data than functions would when using STM.
Along the way I also discovered SSI serializable snapshot isolation but it isn't yet available in rocksdb but cockroachdb apparently has a fork of rocksdb with it but I couldn't find it.
Anyway the db library which wraps around rocksdb is available to be used embedded in any nodejs program at https://github.com/MatrixAI/js-db.
stm-containers
-
Software Transactional Memory (1997)
I think you are right about STM being roughly equivalent to snapshot isolation.
What STM offers is an easy way to invent "containers for snapshotted values" aka TVars. Using them carefully may result in better scaling: https://hackage.haskell.org/package/stm-containers
-
How to achieve "Run at most one parallel async action per user"?
how about use stm-containers?
What are some alternatives?
TypeORM - ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
stm-incremental - A very simple interface for incremental computation using STM in Haskell.
stmx - High performance Transactional Memory for Common Lisp
restricted-workers - Interactive-diagrams
stm-chunked-queues - Thread communication queues that group items/requests that occur close together in time
theatre - Minimalistic actor library for Haskell
named-lock - A named lock that is created on demand.
conceit - Concurrently + Either
ttrie - A contention-free STM hash map for Haskell
stm-hamt - STM-specialised Hash Array Mapped Trie
stm-channelize - Transactional I/O for duplex streams
stm-queue-extras - Extra utilities for STM queues