https://github.com/hemisphere-studio/async-subscription-map
Async bookkeeping data structure for multithreaded state subscriptions
https://github.com/hemisphere-studio/async-subscription-map
async data-structures multithreading subscriptions
Last synced: about 1 year ago
JSON representation
Async bookkeeping data structure for multithreaded state subscriptions
- Host: GitHub
- URL: https://github.com/hemisphere-studio/async-subscription-map
- Owner: hemisphere-studio
- License: mit
- Created: 2023-09-13T17:51:18.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-16T11:39:20.000Z (over 2 years ago)
- Last Synced: 2023-09-16T22:19:04.277Z (over 2 years ago)
- Topics: async, data-structures, multithreading, subscriptions
- Language: Rust
- Homepage: https://crates.io/crates/async-subscription-map
- Size: 65.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
async-subscription-map
Async bookkeeping datastructure for state subscriptions
A subscription map is a self cleaning map of `Observable`s which tracks tasks
that want to subscribe to state updates on a certain key. This becomes very
useful if you have multiple tasks in your program and you want to wait in one
task until the other starts publishing state updates.
It enables you to generically communicate through your whole program by just
knowing an identifier, no need to pass observables around - they are created on
the fly and only if someone subscribes to them. This is ideal for highly
asynchronous and performance critical backend implementations which serve data
accross multiple channels and want to cut down latency through communicating in
memory.

## Self Cleaning Nature
The subscription map is selfcleaing in the sense that it removes every
subscription entry and its data as soon as no one subscribes to it and thus
actively preventing memory leaks!
## Observables
This project is build ontop of
[async-observable](https://crates.io/crates/async-observable), take a look at
it to understand the underlying synchronization api.
This code was originally published by HUM Systems. This repository continues the development of this library as they sadly stopped their open source efforts.