Skip to content

This is example used in my talk REST API vs gRPC. Simple example of Bank backend in gRPC with JavaFX notification client

License

Notifications You must be signed in to change notification settings

vladimir-dejanovic/grpc-bank-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

This is example code used in my talk REST API vs gRPC.

This is just show case example to demonstrate gRPC and some of it's functionalities. This code shouldn't be used in real production systems.

How do I get set up?

  • Java 1.8 minimum
  • Maven or some IDE from which you can build code

After you download the code just build it and make sure it will compile with your setup

mvn clean install

How to start it?

This example consists of example gRPC Bank Server which expose multiple services and gRPC clients for calling those services.

To Start Bank server run this command

  mvn exec:java -Dexec.mainClass=xyz.itshark.play.rpc.grpc.bank.BankServer

Notifications Console Client

mvn exec:java -Dexec.mainClass=xyz.itshark.play.rpc.grpc.bank.client.NotificationsConsoleClient -Dexec.args="1"
mvn exec:java -Dexec.mainClass=xyz.itshark.play.rpc.grpc.bank.client.NotificationsConsoleClient -Dexec.args="2"

Notifications JavaFX client

mvn exec:java -Dexec.mainClass=xyz.itshark.play.rpc.grpc.bank.client.NotificationsJavaFXClient

Transfer money from account 1 to account 2

mvn exec:java -Dexec.mainClass=xyz.itshark.play.rpc.grpc.bank.client.TransferClient

To request transfer run this command

mvn exec:java -Dexec.mainClass=xyz.itshark.play.rpc.grpc.bank.client.RequestClient

About

This is example used in my talk REST API vs gRPC. Simple example of Bank backend in gRPC with JavaFX notification client

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages