Awesome
<!-- markdownlint-disable MD033 MD045 -->Hello gRPC
Simple server and client examples showcasing gRPC features(including proxy and propagate, running in containers and kubernetes) with:
:coffee: What is
No. | Lang | 4 MODELS | Collection | Sleep | Random | Timestamp | UUID | Env |
---|---|---|---|---|---|---|---|---|
1 | java | š | š | š | š | š | š | š |
2 | go | š | š | š | š | š | š | š |
3 | nodejs | š | š | š | š | š | š | š |
4 | typescript | š | š | š | š | š | š | š |
5 | python | š | š | š | š | š | š | š |
6 | rust | š | š | š | š | š | š | š |
7 | c++ | š | š | š | š | š | š | š |
8 | c# | š | š | š | š | š | š | š |
9 | kotlin | š | š | š | š | š | š | š |
10 | swift | š | š | š | š | š | š | š |
11 | dart | š | š | š | š | š | š | š |
12 | php | š | š | š | š | š | š | š |
No. | Lang | Header | TLS | Proxy | Docker | Build | UT | LOG |
---|---|---|---|---|---|---|---|---|
1 | java | š | š | š | š | maven | junit5 | log4j2 |
2 | go | š | š | š | š | (mod) | (testing) | logrus |
3 | nodejs | š | š„ | š | š | npm | mocha | winston |
4 | typescript | š | š | š | š | yarn&tsc | winston | |
5 | python | š | š | š | š | pip | (unittest) | (logging) |
6 | rust | š | š | š | š | cargo | (test) | log4rs |
7 | c++ | š | š | š | š | bazel/cmake | Catch2 | glog |
8 | c# | š | š | š | š | nuget | NUnit | log4net |
9 | kotlin | š | š | š | š | gradle | junit5 | log4j2 |
10 | swift | š | š | š | š | spm | (XCTest) | swift-log |
11 | dart | š | š | š | š | pub | test | logger |
12 | php | š | š | š | š | composer | phpunit | log4php |
š
:apple:
done š:green_apple:
unimplemented š„:avocado:
known issues
:coffee: How to use
1 Envs
GRPC_SERVER
: grpc server host on client side.GRPC_SERVER_PORT
: grpc server port on client side.GRPC_HELLO_BACKEND
: next grpc server host on server side.GRPC_HELLO_BACKEND_PORT
:next grpc server port on server side.GRPC_HELLO_SECURE
: set it asY
when you want to useTLS
on both sides.
2 Containers
Running in containers sample:
client(kotlin) -[tls]:8881
-> server1(java) -[tls]:8882
-> server2(golang) -[tls]:8883
-> server3(rust)
# server3(golang):8883
docker run --rm --name grpc_server_go -d \
-p 8883:8883 \
-e GRPC_SERVER_PORT=8883 \
feuyeux/grpc_server_rust:1.0.0
# server2(rust):8882
docker run --rm --name grpc_server_rust -d \
-p 8882:8882 \
-e GRPC_SERVER_PORT=8882 \
-e GRPC_HELLO_BACKEND=$(ipconfig getifaddr en0) \
-e GRPC_HELLO_BACKEND_PORT=8883 \
feuyeux/grpc_server_go:1.0.0
# server1(java):8881
docker run --rm --name grpc_server_java -d \
-p 8881:8881 \
-e GRPC_SERVER_PORT=8881 \
-e GRPC_HELLO_BACKEND=$(ipconfig getifaddr en0) \
-e GRPC_HELLO_BACKEND_PORT=8882 \
feuyeux/grpc_server_java:1.0.0
# client(kotlin)
docker run --rm --name grpc_client_kotlin \
-e GRPC_SERVER=$(ipconfig getifaddr en0) \
-e GRPC_SERVER_PORT=8881 \
feuyeux/grpc_client_kotlin:1.0.0
Docker-Mesh-Kube
- build and publish docker image
- running on kube
- running above service mesh
- support open tracing
- transcoder(Http2gRPC)
3 Logs
Enable gRpc Debugging
export GRPC_VERBOSITY=DEBUG
export GRPC_TRACE=all
:coffee: Recommend
- https://github.com/grpc-ecosystem/awesome-grpc
- https://github.com/grpc-ecosystem/grpc-gateway
- https://github.com/grpc/grpc-web