Account gRPC service.
Showcase backpressure handling techniques:
- Dropping the messages.
- Sensible buffering strategies (time vs count).
- Blocking the execution and processing the current set of events.
- Throttling and debouncing strategies.
- Portable validations for Kotlin
- Try Connect-Kotlin
# server
gradle :services:account:run
# proxy
docker compose up envoy
# client -> proxy -> server
gradle :services:account:runAccountClient
# client -> server
CERTS_CACERT=config/certs/upstream-ca-cert.pem \
ACCOUNT_ENDPOINT=dns:///localhost:5001 \
ACCOUNT_AUTHORITY=localhost \
gradle :services:account:runAccountClient
CERTS_CACERT=config/certs/upstream-ca-cert.pem \
ACCOUNT_ENDPOINT=dns:///localhost:5001 \
ACCOUNT_AUTHORITY=localhost \
gradle :services:account:runEchoClient
gradle :services:account:test
gradle :services:account:test -Dkotest.tags.exclude=Slow
gradle :services:account:test -Dkotest.tags.include=E2E
# test API directly with TLS
grpcurl -insecure \
-protoset <(buf build -o -) \
-d '{ "id": "sumo" }' 0.0.0.0:5001 micro.apps.proto.account.v1.AccountService/Get
grpcurl -insecure \
-protoset <(buf build -o -) \
-d '{ "message": "sumo" }' 0.0.0.0:5001 micro.apps.proto.echo.v1.EchoService/Echo
# test API via envoy with TLS, and client cert
grpcurl -cacert=config/certs/ca-cert.pem \
-cert=config/certs/client-cert.pem \
-key=config/certs/client-key.pem \
-protoset <(buf build -o -) \
-d '{ "id": "sumo" }' localhost:9444 micro.apps.proto.account.v1.AccountService/Get
grpcurl -cacert=config/certs/ca-cert.pem \
-cert=config/certs/client-cert.pem \
-key=config/certs/client-key.pem \
-protoset <(buf build -o -) \
-d '{ "message": "sumo" }' localhost:9444 micro.apps.proto.echo.v1.EchoService/Echo
# no TLS
grpcurl -plaintext \
-protoset <(buf build -o -) \
-d '{ "message": "sumo" }' 0.0.0.0:9090 micro.apps.proto.echo.v1.EchoService/Echo
# clean
gradle :services:account:clean
# make fatJar
gradle :services:account:build
# docker build
gradle :services:account:jibDockerBuild
# prune dangling images.
docker image prune -f
# run image
docker run -it -v $PWD/config:/config xmlking/micro-services-account:1.6.5-SNAPSHOT
# custom build
gradle :services:account:jib \
-Djib.to.image=myregistry/myimage:latest \
-Djib.to.auth.username=$USERNAME \
-Djib.to.auth.password=$PASSWORD
# build native
gradle :services:account:nativeCompile
gradle :services:account:nativeRun
gradle :services:account:nativeTestBuild
gradle :services:account:nativeTest
- Announcing Open Source gRPC Kotlin Deck
- A collection of useful/essential gRPC Java Examples
- Lessons Learned Implementing Microservices in Kubernetes
- Death Star demo App by Marharyta
- kotlin-samples
- gRPC Server Reflection Tutorial
- traffic-director-grpc-examples
- Using FieldMask with gRPC/Protobuf to emulate GraphQL