Coder Social home page Coder Social logo

pasdam / grpcexample Goto Github PK

View Code? Open in Web Editor NEW
13.0 3.0 3.0 395 KB

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

License: GNU General Public License v3.0

Makefile 45.40% C++ 28.95% Go 7.49% QMake 3.69% QML 4.86% JavaScript 3.48% HTML 1.52% Dockerfile 4.61%
grpc proto qml gui cplusplus golang

grpcexample's Introduction

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.

grpcexample's People

Contributors

dependabot[bot] avatar pasdam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.