/poc-grpc-java-maven

POC of a gRPC project in Java using Maven ☕️

Primary LanguageJavaApache License 2.0Apache-2.0

gRPC (Google Remote Procedure Call) Java with MAVEN

POC of a gRPC project in Java using Maven ☕️

Project

This project contains 2 services: one for LOGIN and one for LOGOUT.

  • The Login service will return SUCCESS if the username is the same as the password (responseCode 200). Otherwise, the Login service will return INVALID PASSWORD (responseCode 400).

  • The Logout service will always return LOGOUT SUCCESS (responseCode 200).

Setup

On the GrpcServer directory, run:

mvn clean generate-sources compile install

On the GrpcClient directory, run:

mvn clean generate-sources compile install

Run

To start the Server:

  • On the GrpcServer/src/main/java directory, run the main method from the GrpcServer.java class.

  • Note: It will run on port 9090.

To use the Client:

  • On another terminal, run the main method from the GrpcClient.java class located in the GrpcClient/src/main/java directory.

Using a gRPC Client Tool:

Login Success

Login Success

Login Error

Login Error

Logout Success

Logout Success