https://github.com/meero-com/hmb-proxy
HTTP server acting like an synchronous interface for asynchronous services.
https://github.com/meero-com/hmb-proxy
api asynchronous container go http
Last synced: 17 days ago
JSON representation
HTTP server acting like an synchronous interface for asynchronous services.
- Host: GitHub
- URL: https://github.com/meero-com/hmb-proxy
- Owner: meero-com
- License: mit
- Created: 2024-12-11T09:56:46.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-19T09:57:36.000Z (11 months ago)
- Last Synced: 2025-07-17T13:49:31.592Z (7 months ago)
- Topics: api, asynchronous, container, go, http
- Language: Go
- Homepage:
- Size: 6.76 MB
- Stars: 15
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# HMB proxy

Hold My Beer proxy
------
Abstract asynchronous processing and make it synchronous for your clients.
[](https://github.com/meero-com/hmb-proxy/actions/workflows/ci.yml)
## Goal
The HMB proxy is made to allow under-the-hood, loosely coupled processing with parallel processing in mind.
Instead of having a "fire & forget", callback-supported asynchronous processing, customers can rely on simple HTTP calls
while having all the benefits of async processing.
Using a **timeout** / **retry** / **exponential back-off** strategy, users can completely abstract the implementation
complexity of asynchronous systems.

## Usage
```console
$ export GIN_MODE=release
$ hmb-proxy --env=prod
2025/02/19 15:33:01 sqs: map[destination_queue:output-queue source_queue:input-queue]
2025/02/19 15:33:01 aws: map[access_key_id:default endpoint_url:http://localstack:4566/ region:eu-west-1 secret_access_key:default]
2025/02/19 15:33:01 env: prod
2025/02/19 15:33:01 server: map[port:8080]
```
You can then forward requests to the proxy using `curl`.
A dummy-service is available in [./dummy-service](./dummy-service) to try out the
loosely coupling mechanism locally.
Alternatively, the repository contains a [`./e2e`](./e2e) script to manually simulate
a backend service.
> This project is not Production-ready as of now. Feel free to use it, give your feedback and to help us improve it !
## Build
This project supports packaging through container images.
The proxy can be built using the following command:
```console
$ docker build -t hmb-proxy:local .
```
It can then be run locally using:
```console
$ docker run -it --rm hmb-proxy:local
```
## Development
The repository offers different utilities to improve development.
### Compose setup
A `docker-compose.yml` manifest is available in the top-level directory to emulate AWS services using localstack.
```console
$ docker compose up -d --wait
[+] Running 2/2
✔ Container hmb-proxy-hmb-proxy-1 Healthy 1.8s
✔ Container hmb-proxy-localstack-1 Healthy 6.8s
```
## Glossary
- Project name: HMB proxy
- Reference to the executable: hmb-proxy