From a4ad187de00309d5775bb2f61f080252ed89074e Mon Sep 17 00:00:00 2001 From: Ryan Michela Date: Thu, 30 Nov 2017 09:40:58 -0800 Subject: [PATCH 1/4] Update doc links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 90afedee..d65616ab 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ back-pressure model. Reactive gRPC supports the following reactive programming models: -* [RxJava 2](https://github.com/ReactiveX/RxJava) -* [Spring Reactor](https://projectreactor.io/) +* [RxJava 2](https://github.com/salesforce/reactive-grpc/tree/master/rx-java) +* [Spring Reactor](https://github.com/salesforce/reactive-grpc/tree/master/reactor) * (Eventually) [Java9 Flow](https://community.oracle.com/docs/DOC-1006738) # Usage From 2c1b4649d036616cd20da274b5402035a88765d3 Mon Sep 17 00:00:00 2001 From: Ryan Michela Date: Thu, 30 Nov 2017 09:53:48 -0800 Subject: [PATCH 2/4] Added gradle documentation to RxGrpc --- rx-java/README.md | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/rx-java/README.md b/rx-java/README.md index 65683afd..d79a8da7 100644 --- a/rx-java/README.md +++ b/rx-java/README.md @@ -2,8 +2,9 @@ Overview ======== RxGrpc is a new set of gRPC bindings for reactive programming with [RxJava](https://github.com/ReactiveX/RxJava). -Usage -===== +Installation +============ +### Maven To use RxGrpc with the `protobuf-maven-plugin`, add a [custom protoc plugin configuration section](https://www.xolstice.org/protobuf-maven-plugin/examples/protoc-plugin.html). ```xml @@ -16,7 +17,34 @@ To use RxGrpc with the `protobuf-maven-plugin`, add a [custom protoc plugin conf ``` +### Gradle +To use RxGrpc with the `protobuf-gradle-plugin`, add a RxGrpc to the protobuf `plugins` section. +```scala +protobuf { + protoc { + // The artifact spec for the Protobuf Compiler + artifact = "com.google.protobuf:protoc:${protobufVersion}" + } + plugins { + grpc { + artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" + } + rxgrpc { + artifact = "com.salesforce.servicelibs:rxgrpc:${reactiveGrpcVersion}:jdk8@jar" + } + } + generateProtoTasks { + ofSourceSet("main")*.plugins { + grpc { } + rxgrpc {} + } + } +} +``` +*At this time, RxGrpc with Gradle only supports bash-based environments. Windows users will need to build using Windows Subsystem for Linux (win 10), Gitbash, or Cygwin.* +Usage +===== After installing the plugin, RxGrpc service stubs will be generated along with your gRPC service stubs. * To implement a service using an RxGrpc service, subclass `Rx[Name]Grpc.[Name]ImplBase` and override the RxJava-based From efbd10344901a7458e7976743fe246b4adde89a4 Mon Sep 17 00:00:00 2001 From: Ryan Michela Date: Thu, 30 Nov 2017 09:56:35 -0800 Subject: [PATCH 3/4] Added gradle documentation to Reactor --- reactor/README.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/reactor/README.md b/reactor/README.md index 305a6140..15b4e3f8 100644 --- a/reactor/README.md +++ b/reactor/README.md @@ -2,8 +2,9 @@ Overview ======== Reactor-gRPC is a set of gRPC bindings for reactive programming with [Reactor](http://projectreactor.io/). -Usage +Installation ===== +### Maven To use Reactor-gRPC with the `protobuf-maven-plugin`, add a [custom protoc plugin configuration section](https://www.xolstice.org/protobuf-maven-plugin/examples/protoc-plugin.html). ```xml @@ -17,6 +18,34 @@ To use Reactor-gRPC with the `protobuf-maven-plugin`, add a [custom protoc plugi ``` +### Gradle +To use RxGrpc with the `protobuf-gradle-plugin`, add a RxGrpc to the protobuf `plugins` section. +```scala +protobuf { + protoc { + // The artifact spec for the Protobuf Compiler + artifact = "com.google.protobuf:protoc:${protobufVersion}" + } + plugins { + grpc { + artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" + } + reactor { + artifact = "com.salesforce.servicelibs:reactor-grpc:${reactiveGrpcVersion}:jdk8@jar" + } + } + generateProtoTasks { + ofSourceSet("main")*.plugins { + grpc { } + reactor {} + } + } +} +``` +*At this time, RxGrpc with Gradle only supports bash-based environments. Windows users will need to build using Windows Subsystem for Linux (win 10), Gitbash, or Cygwin.* + +Usage +===== After installing the plugin, Reactor-gRPC service stubs will be generated along with your gRPC service stubs. * To implement a service using an Reactor-gRPC service, subclass `Reactor[Name]Grpc.[Name]ImplBase` and override the Reactor-based From c48774722ed2b9e39f53d7a80ec966a843abe987 Mon Sep 17 00:00:00 2001 From: Ryan Michela Date: Thu, 30 Nov 2017 10:01:42 -0800 Subject: [PATCH 4/4] Added demos links --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index d65616ab..48af42f6 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,11 @@ Reactive gRPC supports the following reactive programming models: # Usage See the readme in each technology-specific sub-directory for usage details. +# Demos + +* [RxChat](https://github.com/salesforce/reactive-grpc/tree/master/demos/RxChat) - An IRC-like chat system built using RxJava and RxGrpc. +* [ReactorChat](https://github.com/salesforce/reactive-grpc/tree/master/demos/ReactorChat) - An IRC-like chat system using Spring Reactor and ReactorGrpc. + # Back-pressure Reactive gRPC stubs support bi-directional streaming with back-pressure. Under the hood, Reactive gRPC is built atop the vanilla gRPC service stubs generated by protoc. As such, they inherit gRPC's HTTP/2-based back-pressure model.