All Projects → politrons → RPC_reactive

politrons / RPC_reactive

Licence: other
Examples and explanations of how RPC systems works.

Programming Languages

java
68154 projects - #9 most used programming language
scala
5932 projects
Thrift
134 projects

Projects that are alternatives of or similar to RPC reactive

Javaspringbootsamples
SpringBoot、Dubbo、SpringCloud的各种集成例子:Atomikos、gRPC、Thrift、Seata、ShardingSphere、Dubbo、Hmily、Nacos、Consul、Ribbon、Jedis、Lettuce、Redisson等框架
Stars: ✭ 399 (+1496%)
Mutual labels:  grpc, thrift
Finatra
Fast, testable, Scala services built on TwitterServer and Finagle
Stars: ✭ 2,126 (+8404%)
Mutual labels:  thrift, finagle
Finagle
A fault tolerant, protocol-agnostic RPC system
Stars: ✭ 8,126 (+32404%)
Mutual labels:  thrift, finagle
Yarpc Go
A message passing platform for Go
Stars: ✭ 285 (+1040%)
Mutual labels:  grpc, thrift
Springboot Learning
基于Gradle构建,使用SpringBoot在各个场景的应用,包括集成消息中间件、前后端分离、数据库、缓存、分布式锁、分布式事务等
Stars: ✭ 340 (+1260%)
Mutual labels:  grpc, thrift
Armeria
Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
Stars: ✭ 3,392 (+13468%)
Mutual labels:  grpc, thrift
Turbo
A lightweight microservice tool, turn your grpc|thrift APIs into HTTP APIs!
Stars: ✭ 275 (+1000%)
Mutual labels:  grpc, thrift
Viper
Viper 是一个基于Anno微服务引擎开发的Dashboard项目、示例项目。Anno 底层通讯采用 grpc、thrift。自带服务发现、调用链追踪、Cron 调度、限流、事件总线等等
Stars: ✭ 402 (+1508%)
Mutual labels:  grpc, thrift
Jboot
一个优雅的微服务框架,SpringCloud 之外的另一个选择,已经使用在用户量过亿的商业产品上,有超过1000家公司在使用Jboot做极速开发...
Stars: ✭ 655 (+2520%)
Mutual labels:  grpc, thrift
jobor
支持秒级分布式定时任务系统, A high performance distributed task scheduling system, Support multi protocol scheduling tasks
Stars: ✭ 52 (+108%)
Mutual labels:  grpc
Binder
🦁"Hello World" <-> [🏷, 🏷, 🏷, 🏷]
Stars: ✭ 37 (+48%)
Mutual labels:  reactive-programming
qtprotobuf
Protobuf generator and bindings for Qt framework
Stars: ✭ 138 (+452%)
Mutual labels:  grpc
FSharp.GrpcCodeGenerator
A protoc plugin to enable generation of F# code
Stars: ✭ 61 (+144%)
Mutual labels:  grpc
Sitko.Core
Sitko.Core is a set of libraries to help build .NET Core applications fast
Stars: ✭ 46 (+84%)
Mutual labels:  grpc
protoc-plugin
A protoc compiler plugin for Clojure applications
Stars: ✭ 28 (+12%)
Mutual labels:  grpc
agrpc
Async GRPC with C++20 coroutine support
Stars: ✭ 53 (+112%)
Mutual labels:  grpc
thrift2-hbase
thrift2-hbase component for Hyperf.
Stars: ✭ 14 (-44%)
Mutual labels:  thrift
compatip
A simple tool to ensure compatibility between microservices
Stars: ✭ 13 (-48%)
Mutual labels:  grpc
protoc-gen-grpc-gateway-ts
protoc-gen-grpc-gateway-ts is a Typescript client generator for the grpc-gateway project. It generates idiomatic Typescript clients that connect the web frontend and golang backend fronted by grpc-gateway.
Stars: ✭ 68 (+172%)
Mutual labels:  grpc
grpc-jwt-spring-boot-starter
Spring boot starter for gRPC framework with JWT authorization
Stars: ✭ 24 (-4%)
Mutual labels:  grpc

Author Pablo Pérez García

My image

Reactive RPC

Here we cover with some examples and explanations how most famous RPC as gRPC or Thrift works.

gRPC

Simple gRCP

My image

An example of how gRPC works between client-server

Reactive

My image

An example of how to use streams gRPC between client-server

Configuration

Once that you have your contracts(proto) ready, you need to build your classes which will be used for the communication between client and server. In these examples we decide to use the maven plugin.

The plugin you need to add in your pom is

  <plugin>
         <groupId>org.xolstice.maven.plugins</groupId>
         <artifactId>protobuf-maven-plugin</artifactId>
         <version>0.5.0</version>
         <configuration>
              <protocArtifact>
                        com.google.protobuf:protoc:3.3.0:exe:${os.detected.classifier}
              </protocArtifact>
              <pluginId>grpc-java</pluginId>
              <pluginArtifact>
                        io.grpc:protoc-gen-grpc-java:1.4.0:exe:${os.detected.classifier}
              </pluginArtifact>
              </configuration>
              <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>compile-custom</goal>
                        </goals>
                    </execution>
              </executions>
  </plugin>


Thrift

My image

An example of how thrift RPC works between client-server

Configuration

Just like with gRPC once that you have your contracts(thrift) ready, you need to build your classes which will be used for the communication between client and server. In these examples we decide to use the twitter scrooge maven plugin.

The plugin you need to add in your pom is

          <plugin>
                <groupId>com.twitter</groupId>
                <artifactId>scrooge-maven-plugin</artifactId>
                <version>18.2.0</version>
                <configuration>
                    <thriftSourceRoot>src/main/scala/finagle/thrift/idl/</thriftSourceRoot>
                    <thriftNamespaceMappings>
                        <thriftNamespaceMapping>
                            <from>finagle.thrift.idl</from>
                            <to>finagle.thrift</to>
                        </thriftNamespaceMapping>
                    </thriftNamespaceMappings>
                    <language>scala</language> <!-- default is scala -->
                    <thriftOpts>
                        <!-- add other Scrooge command line options using thriftOpts -->
                        <thriftOpt>--finagle</thriftOpt>
                    </thriftOpts>
                    <!-- tell scrooge to not to build the extracted thrift files (defaults to true) -->
                    <buildExtractedThrift>false</buildExtractedThrift>
                </configuration>
                <executions>
                    <execution>
                        <id>thrift-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>thrift-test-sources</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>


Avro

My image

An example of how avro encoder/decoder works between client-server

An example of how avro RPC works between client-server

Configuration

Just like with gRPC once that you have your contracts(avro) ready, you need to build your classes which will be used for the communication between client and server. In these examples we use avro-maven-plugin<.

The plugin you need to add in your pom is

           <plugin>
                <groupId>org.apache.avro</groupId>
                <artifactId>avro-maven-plugin</artifactId>
                <version>1.8.2</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>schema</goal>
                            <goal>protocol</goal>
                            <goal>idl-protocol</goal>
                        </goals>
                        <configuration>
                            <sourceDirectory>${project.basedir}/src/main/avro/</sourceDirectory>
                            <outputDirectory>${project.basedir}/src/main/java/</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Benchmarks

My image

For this benchmark we made 1000 request with Json body for Rest and proto and thrift for RPC.

  • Rest Http finagle client against Grizzly server.

  • Rest Http finagle client against Finagle server.

  • gRPC using standard implementation.

  • gRPC Reactive using reactive StreamObserver.

  • Thrift RPC using Apache thrift.

  • Avro RPC Using Apache Avro.

Results

My image

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].