GithubHelp home page GithubHelp logo

leveeer / grpc-springboot-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from denuwanhh/grpc-springboot-demo

0.0 0.0 0.0 139 KB

Spring-boot microservice solution which contains a Netflix-Eureka discovery server and two microservice in Employee & Allocation domains. And interservice communication happens via gRPC.

Java 100.00%

grpc-springboot-demo's Introduction

gRPC - Spring boot Implementation

In this implementation, We build a spring boot microservice solution which contains a Netflix-Eureka discovery server and two microservice in Employee & Allocation domains. And the interface project contains the raw protocol-buffer files and using the protocol buffer compiler maven plugin generates the java model and service classes.

High-level Architecture Diagram

How to Run

  1. Clone the repository to your local machine
  2. Navigate to the grpc-springboot-demo folder and run following command for build the project
    mvn package
  3. Run applications using following commands
    java -jar grpc-springboot-demo\demo-eureka-server\target\demo-eureka-server-0.0.1-SNAPSHOT.jar
    java -jar grpc-springboot-demo\demo-employee-service\target\demo-employee-service-0.0.1-SNAPSHOT.jar
    java -jar grpc-springboot-demo\demo-allocation-service\target\demo-allocation-service-0.0.1-SNAPSHOT.jar

Service Methods

  • Unary RPCs (gRPC Server: employee-service, gRPC Client: allocation-service)
    Proto Definition: rpc getEmployee (Employee) returns (Employee) { }
    End Point: {IP Address}:8082/allocation/{allocationID}

  • Server streaming RPCs (gRPC Server: allocation-service, gRPC Client: employee-service)
    Proto Definition: rpc getAllocationByEmployee (Allocation) returns (stream Allocation) { }
    Synchronous End Point: {IP Address}:8089/employee/{employeeID}/allocation
    Asynchronous End Point: {IP Address}:8089/employee/{employeeID}/allocation?isSyncClient=N

  • Client streaming RPCs (gRPC Server: employee-service, gRPC Client: allocation-service)
    Proto Definition: rpc getMostExperiencedEmployee (stream Employee) returns (Employee) { }
    End Point: {IP Address}:8082/{projectID}/allocation/getexperiencedemployeeinproject

  • Bidirectional streaming RPCs (gRPC Server: employee-service, gRPC Client: allocation-service)
    Proto Definition: rpc getAllEmployeesByIDList (stream Employee) returns (stream Employee) { }
    End Point: {IP Address}:8082/allocation?projectID={projectID}

grpc-springboot-demo's People

Contributors

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