/dapr-try

POC for Dapr services using grpc

Primary LanguageGo

DAPR with GRPC

Small example to try using Dapr to implement services in kubernetes, using gRPC for comms.

Architecture

Simple two applications in go, a server app that exposes a service over gRPC and a client app that calls the server.

client also exposes a http endpoint that you can curl to trigger the backend server and see the output.

server exposes the services through Dapr and client uses Dapr to call server.

             /-----------------------------------\   /-----------------------------------\
 O           |    +--------+           +-----+   |   |    +------+           +-------+   |   
/|\ - http - | -> | client | - grpc -> | dapr| - | - | -> | dapr | - grpc -> | server|   |
/ \          |    +--------+           +-----+   |   |    +------+           +-------+   |
             |             CLIENT POD            |   |             SERVER POD            |
             \-----------------------------------/   \-----------------------------------/

Install locally

Uses Kind for local cluster and Ko for deployments.

  1. Run the scripts under ./deployments/kind to create a local kind cluser and install dapr.

  2. Run .apply.sh to deploy the application locally.