https://github.com/mrkagelui/alfred
Reliable, Efficient and Idempotent Distribution of Laborious, Runtime-Error-Ridden Jobs
https://github.com/mrkagelui/alfred
architecture database message-queue poc
Last synced: 4 months ago
JSON representation
Reliable, Efficient and Idempotent Distribution of Laborious, Runtime-Error-Ridden Jobs
- Host: GitHub
- URL: https://github.com/mrkagelui/alfred
- Owner: mrkagelui
- License: unlicense
- Created: 2024-05-17T15:08:45.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-21T01:28:20.000Z (about 2 years ago)
- Last Synced: 2024-05-21T20:25:50.106Z (about 2 years ago)
- Topics: architecture, database, message-queue, poc
- Language: Go
- Homepage:
- Size: 1.21 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README


[](https://go.dev/)
# Reliable, Efficient and Idempotent Distribution of Laborious, Runtime-Error-Ridden Jobs
This project demonstrates the idea of leveraging an RDBMS (PostgreSQL here) to achieve job distribution without the use of message queues.
A more detailed explanation and motivation can be found at https://www.linkedin.com/pulse/db-mq-reliable-task-distributions-poc-jason-lui-1zmzc/.
To see the implementation of the handling, you may just read [handle/handle.go](handle/handle.go). The rest of this repo exists only to make it runnable.
## How to run
### Prerequisites
- Go (1.22)
- Docker
- GNU make utility (optional, it only makes the commands shorter)
To run the project, use the following command
```shell
make run
```
with the default config. Check out the top part of [main.go](main.go), struct `config` for the list of environment variables.
To override some of them, run it like
```shell
SEED_SIZE=1000 make run
```
## Sequence Diagram
The project implements 