Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thangchung/actix-dapr-rs
Make dapr-rs working with actix-web better
https://github.com/thangchung/actix-dapr-rs
actix-web dapr rust rust-sdk tokio tonic webapp
Last synced: 3 months ago
JSON representation
Make dapr-rs working with actix-web better
- Host: GitHub
- URL: https://github.com/thangchung/actix-dapr-rs
- Owner: thangchung
- License: mit
- Created: 2021-05-07T13:53:58.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-05-08T10:34:07.000Z (over 3 years ago)
- Last Synced: 2024-10-04T19:43:38.251Z (3 months ago)
- Topics: actix-web, dapr, rust, rust-sdk, tokio, tonic, webapp
- Language: Rust
- Homepage:
- Size: 60.5 KB
- Stars: 6
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# What we do in this project?
We want to use `dapr` with `dapr-rs`, but also wants to run `actix-web` and other gRPC lib such as `tonic` in the same?
# Why we did that?
`dapr-rust-sdk` is only with very basic sample on `tokio`, but what we want to do is more :) We want to combine all of them together (`dapr` + `actix-web` + `tokio` + `tonic`). Let do it to see how far we can go there :)
# How to run
Make sure you have `dapr` CLI on local machine:
> CLI version: 1.1.0
>
> Runtime version: 1.1.2```bash
$ dapr init
```## Run standalone mode
```bash
$ dapr run --app-id rust-subscriber --app-protocol grpc --app-port 50010 --log-level debug cargo run
```Then
```bash
$ dapr run --app-id rust-publisher --app-protocol grpc --log-level debug cargo run
```You should see the ping and pong message on the subscriber console!
And you can call `Helloworld` on `50010` - `http2` as well as access to `http://127.0.0.1:8088/index.html` =))
![](assets/grpc_hello_world.png)
## Run on docker-compose
If you run `dapr` CLI before on your local machine, plz make sure you run
```bash
$ dapr uninstall --all
```And now run the following commands:
```bash
$ docker-compose build
$ docker-compose up
```Happy hacking!