https://github.com/dejanfajfar/grpcintro
A small introduction into the world of grpc
https://github.com/dejanfajfar/grpcintro
grpc samples showcase
Last synced: 5 months ago
JSON representation
A small introduction into the world of grpc
- Host: GitHub
- URL: https://github.com/dejanfajfar/grpcintro
- Owner: dejanfajfar
- License: apache-2.0
- Created: 2019-06-19T05:53:55.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-02-11T02:34:31.000Z (about 4 years ago)
- Last Synced: 2025-05-30T16:16:27.256Z (10 months ago)
- Topics: grpc, samples, showcase
- Language: JavaScript
- Size: 56.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grpc simple sample
The purpose of this application is to show the basic features and implementation details for a simple *gRPC* client and server.
## Structure
To keep things simple, you know the KISS principle, we have stuffed all the code into one git repository that now contains multiple projects. The projects are:
### Server
The sample gRPC server implementation
### jsClient
A collection of simple nodejs applications to show various gRPC scenarios
## Showcases
* A simple chat
* A stream of generated numbers
* A simple echo service
### Simple echo service
First we have to start the server locally.
```bash
node server/index.js
```
In another shell start the client:
```bash
node jsClient/hello.js
```
### Stream of generated numbers
First we have to start the server locally.
```bash
node server/index.js
```
In another shell start the client:
```bash
node jsClient/cointoss.js
```
## gRPC concerns
|Concern|Software|
|---|---|
|Server side load balancing|Lyn Envoy, NGinx|
|Client side load balancing|With central registry|
|Service registry|Consul, Zookeper, Eureka, gRPC LB|
|Health Checking|gRPC health check protocol, custom endpoints|
|Security|TLS, token headers|
|Authorization|token headers|
|Distributed tracing|Zipkin, Brave|
|Monitoring|Prometheus|
|Transcoding (gRPC <-> REST)|gRPC Gateway|