https://github.com/abhiroop/blockingqueue
A distributed blocking queue written using Erlang style processes and messaging passing concurrency in Cloud Haskell.
https://github.com/abhiroop/blockingqueue
concurrency distributed-systems erlang haskell
Last synced: 11 months ago
JSON representation
A distributed blocking queue written using Erlang style processes and messaging passing concurrency in Cloud Haskell.
- Host: GitHub
- URL: https://github.com/abhiroop/blockingqueue
- Owner: Abhiroop
- License: bsd-3-clause
- Created: 2017-06-25T14:10:25.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-26T22:21:14.000Z (over 8 years ago)
- Last Synced: 2025-01-24T18:46:24.558Z (about 1 year ago)
- Topics: concurrency, distributed-systems, erlang, haskell
- Language: Haskell
- Size: 8.79 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blocking Queue
Message passing concurrency unlike shared memory concurrency offers a unique way of handling problems in concurrent and distributed systems. Cloud Haskell gives us access to message passing concurrency like Erlang. Here is a Blocking Queue implemented in Cloud Haskell.
We use the `gen-server` implementation of OTP that handles
1. requests to enqueue a task are handled immediately
2. callers which are blocked until the task completes (or fails)
3. an upper bound is placed on the number of concurrent running tasks
Once the upper bound is reached, tasks will be queued up for execution. Only when we drop below this limit will tasks be taken from the backlog and executed.