This repository contains an example of a service defined with gRPC, it's my playground to explore gRPC implementation in different languages.
As of now it contains a server written in Go, and three clients, a command line one, one with a GUI written with Qt/QML, and a web one.
DISCLAIMER: this is a quick hack, it's just a showcase, the project doesn't necessarily follow all the best practices.
Minimum:
- make;
- Go 1.8.3;
- gRPC-go;
- pkg-config;
- Protobuf 3.3.2.
Requirements for the command line client:
Requirements for the GUI client:
Requirements for the web client:
Note: the code might works also with previous versions, but it was tested only with the specified ones.
- client
|- cli
|- core
|- qt
- protocol
- server
The client/cli folder contains the command line c++ client, whereas the Qt one is in client/qt; client/core contains files shared between the two clients. The protocol folder contains the proto/gRPC definitions. And finally the server directory contains the server written in Go.
To build the server and the command line client is possible to use the included Makefile:
make
It is also possible to run each target separately:
make <target>
The available targets are:
- client-cli: to build the command line client;
- client-web: to build the javascript client to use in the browser;
- proto: to build the proto files and generate the source for each target language (c++/go/web);
- server: to build the server;
- start-client-cli: to start the command line client;
- start-server: to start the server.
To build the Qt client, simply just open client/qt/GRPCExample.pro with QtCreator and press run.
To read detailed information about the web client, please read the related README.