Skip to content

pasdam/grpcExample

Repository files navigation

GrpcExample

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.

Requirements

Minimum:

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.

Project structure

- 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.

Build

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.

Web client

To read detailed information about the web client, please read the related README.

About

Demo of a service defined with gRPC, a server written in Go, and three clients, a command line one, a web one, and one with a GUI written with Qt/QML

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published