https://github.com/thorstenhans/hello-spin
https://github.com/thorstenhans/hello-spin
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/thorstenhans/hello-spin
- Owner: ThorstenHans
- Created: 2022-09-16T16:16:31.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-16T16:16:46.000Z (almost 4 years ago)
- Last Synced: 2025-04-09T16:57:21.415Z (about 1 year ago)
- Language: Rust
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Conference sample: microservices with Fermyon Spin
This repository contains all the samples shown at code.talks 2022 conference in Hamburg.
## Hello World
[./hello-world](./hello-world/) has been created using the default `http-rust` template. The sample is used to demonstrate how Spin works and explain core concepts.
## Pub/Sub sample
The actual sample is a pub/sub demo using Redis. The overall sample consists of three components
- The message publisher ([./message-publisher](./message-publisher/)) is written in Rust. It accepts inbound HTTP `POST` requests at `http://localhost:3000/publish`. The entire payload will be pushed to redis pub/sub
- The Rust message consumer [./message-consumer](./message-consumer/) will print all received messages to `stdout`
- The (Tiny)Go message consumer [./message-consumer-go](./message-consumer-go/) will also print all received messages to `stdout`
## Running the samples
To run the samples, you must have two things installed on your machine:
- Spin
- Docker
Docker is used to run redis locally. See corresponding shell scripts [start-hello-world.sh](./start-hello-world.sh), [start-redis.sh](./start-redis.sh) and [start-pubsub-sample.sh](./start-pubsub-sample.sh).