Giter Club home page Giter Club logo

boruto's Introduction

Boruto

  • 博人
  • 火影儿子

Module gRPC - Vert.x gRPC examples

Here you will find examples demonstrating Vert.x gRPC in action.

Dependencies required

To use Vert.x gRPC in your own Maven or Gradle project add the following dependency

Group ID: io.vertx
Artifact ID: vertx-grpc

You will need to use the com.google.protobuf plugin to compile the .proto files. These examples use the io.vertx:protoc-gen-grpc-java plugin that creates server and stub classes for Vert.x, this plugin is an extension of the io.grpc:protoc-gen-grpc-java plugin.

The protobuf compiler is available for Maven or Gradle and is OS dependant.

Ping Pong exchanges

This example show how to handle RPC calls that send a single object and receive a single object.

  • gRPC client example
  • gRPC server example

Consumer exchange

This example show how to handle RPC calls that do receive an arbitrary stream of response objects.

  • gRPC client example
  • gRPC server example

Producer exchange

This example show how to handle RPC calls that do sends an arbitrary stream of request objects.

  • gRPC client example
  • gRPC server example

Conversational exchange

This example shows how to handle arbitrary streams of request and response objects.

  • gRPC client example
  • gRPC server example

Hello World example

This example is adapted from the gRPC examples.

It shows a simple gRPC service that invokes a service that takes takes an HelloRequest string wrapper and returns an HelloReply string wrapper.

gRPC server example

The gRPC service extends the GreeterGrpc.GreeterVertxImplBase generated class and implements the service logic.

gRPC client example

The gRPC client creates an instance of the GreeterGrpc.newVertxStub generated class and then use it to invoke the service.

You can run the server and then run the client.

You can read more about it on the gRPC website

SSL example

This example is the Hello World example with SSL configuration.

It shows a simple gRPC service that invokes a service that takes takes an HelloRequest string wrapper and returns an HelloReply string wrapper. The communication uses SSL.

gRPC server example

The gRPC service extends the GreeterGrpc.GreeterVertxImplBase generated class and implements the service logic.

gRPC client example

The gRPC client creates an instance of the GreeterGrpc.newVertxStub generated class and then use it to invoke the service.

You can run the server and then run the client.

Route Guide example

This example is adapted from the gRPC examples.

This example shows the various kind of gRPC service calls:

  • simple RPC
  • server-side streaming RPC
  • client-side streaming RPC
  • bidirectional streaming RPC
  • gRPC server example
  • gRPC client example

You can run the server and then run the client.

You can read more about it on the gRPC website

boruto's People

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.