Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andersfugmann/amqp-client-eio
Amqp client for ocaml multicore based on eio
https://github.com/andersfugmann/amqp-client-eio
amqp-client effects library multicore ocaml-library
Last synced: 2 days ago
JSON representation
Amqp client for ocaml multicore based on eio
- Host: GitHub
- URL: https://github.com/andersfugmann/amqp-client-eio
- Owner: andersfugmann
- License: bsd-3-clause
- Created: 2022-07-28T07:30:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-01T10:03:38.000Z (7 months ago)
- Last Synced: 2024-11-01T17:03:19.092Z (about 2 months ago)
- Topics: amqp-client, effects, library, multicore, ocaml-library
- Language: OCaml
- Homepage: https://andersfugmann.github.io/amqp-client-eio/index.html
- Size: 150 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Multicore Aware AMQP client
AMQP client based on EIO, to allow taking advantage of effect based
ocaml.[![Main
workflow](https://github.com/andersfugmann/amqp-client-eio/actions/workflows/workflow.yml/badge.svg)](https://github.com/andersfugmann/amqp-client-eio/actions/workflows/workflow.yml)[API](https://andersfugmann.github.io/amqp-client-eio/index.html)
## Design
### Goals
#### No need for explicit locking.
Data will be communicated over streams / channels or promises.#### Data processing should be done as close to user a possible
When sending data, data processing (frame encapsulation) should be
done by the calling thread.### Connection
Establish and setup a connection to the amqp server. This just holds
simple primitives.
Each connection will have a sender and a receiver thread. These will
be locked to the same domain (But does not have to)The sender will send everything posted on the sender channel
(potentiallyThe receiver will relay data from the clannels
When creating a connection - should we use the control flow?
(Thats a design choice that can be changed later!)### Channel
A channel has a function to send, and a receiver channel.
Data is relayed from the connection on the receiver channel, which
will lookup receiver to post data to.### Consuming from a queue
Setting up consumption will return a queue for client consumption### Error handling
Error handling is done using exceptions
Connection errors are relayed to all channels.Channel errors are relayed to all waiters.
When sending in ack mode and#### Benchmarking
Core i5, 2 cores - hyperthreading:
~55K messages/src (send/receive pairs) to a rabbitmq server running
locallyCore i9, 8 cores - hyperthreaded:
~92K messages/src (send/receive pairs) to a rabbitmq server running
locally