TobiaszCudnik / demo-grpc-locations

gRPC and protocol buffers (PoC)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gRPC Locations

Example implementation of a location reporting system based on gRPC and protocol buffers. Clients send diff based location data in binary streams. The server lists them and marks the stalled ones.

Part of an interview proces with Balena (2020).

Building

yarn install
yarn build

Testing

yarn test

Debugging

DEBUG=drones:*

Docker

docker build -t tob/grpc-drones .
docker run tob/grpc-drones

CLI

Server

$ DEBUG=drones:* node build/server.js

Client

$ DEBUG=drones:* node build/client-cli.js

Config

There's no config file, but the following can be adjusted:

  • Server.pruneLocationsAfterSec
  • Client.updateDiffIntervalSec
  • Client.updateFullIntervalSec
  • defaultRpcUrl
  • defaultHttpPort

About

gRPC and protocol buffers (PoC)


Languages

Language:TypeScript 62.1%Language:JavaScript 36.1%Language:Shell 1.3%Language:Dockerfile 0.5%