https://github.com/rustworthy/unwrap_qr
Producer-consumer qr-code decoding service. RabbitMQ, Actix, Actix-web
https://github.com/rustworthy/unwrap_qr
Last synced: 3 months ago
JSON representation
Producer-consumer qr-code decoding service. RabbitMQ, Actix, Actix-web
- Host: GitHub
- URL: https://github.com/rustworthy/unwrap_qr
- Owner: rustworthy
- Created: 2022-12-05T20:46:57.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-13T20:24:03.000Z (over 2 years ago)
- Last Synced: 2025-01-26T05:11:28.862Z (4 months ago)
- Language: Rust
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Queue Actor
*src/queue_actor.rs* will hold an abstract handler processing incoming messages and sending new messages to a queue.
The actor will create queues in RabbitMQ and subscribe to topics.### Worker
*src/worker.rs*, the worker msg hanlder will read from 'requests' queue, decode the delivery data (qr code image) and send the result to the 'response' queue.### Server
*src/server.rs* will have a web application with shared state. The state in its turn will have a reference to a server msg handler, that can publish raw messages
to a 'requests' queue, and read processing results from 'responses' queue.### Flow
Procure RabbitMQ container with `make rabbit/up`. Start the server with `make serve`. At *localhost:8089/tasks* upload a few qr-code images. Start the worker with `make worker`. The worker will get the messages from the queue and process them. Upload another image or reload the page.