Create gRPC application where services will interact with each other.
- Money Maker - submit prices on server
- use jwt token for auth on the server
- submit price every 1 sec
- using blocking stub for simplicity
- Server - consume new prices and notify clients with a new prices
- register the clients in Set
- Client - consume prices and print it to output
- using blocking stub for simplicity
- Proto - profobuf definition
Pros | Cons |
---|---|
Very fast streaming secure 362,788 QPS on 8 cores client & server (6.11.2017) | Adoption by external customer? |
Netty async non blocking IO | HAProxy balancing is hacky (do you need it?) |
Bi-direction streaming with TCP multiplexing | |
Deadline propagation | |
Cancellation propagation | |
Flow control | |
Support distributed tracing: Open Tracing, Zipkin | |
gRPC monitoring: prometheus | |
SSL/TLS, token based auth with Google, auth API | |
Build in strategy for service discovery & load balancing | |
Support more than 10+ languages | |
Build in testing support | |
Based on HTTP/2 | |
Use protobuf by default | |
Interface definition language (IDL) | |
Growing ecosystem |
- Start server
mvn exec:java@server
- Start client
mvn exec:java@event-client
- Start server
mvn exec:java@server
- Start money-maker
mvn exec:java@money-maker