@@ -52,16 +52,27 @@ For these reasons, other gRPC clients such as (improbable-eng/grpc-web)[https://
5252have included a websocket transport for gRPC messages. Unfortunately, that repository is no longer maintained, and some
5353features we have found to be necessary were never shipped or never implemented.
5454
55- This library includes two websocket transports - the first is compatible with improbable-eng/grpc-web using one
55+ A simple ` fetch() ` implementation is provided which supports unary and server-streaming calls, but by itself cannot
56+ support other streaming calls.
57+
58+ ### Unfinished transports
59+ This library will include two websocket transports - the first is compatible with improbable-eng/grpc-web using one
5660websocket per stream, and the second supports using a single websocket for multiple streams to the same server (in
5761roughly the same way that http2 would do with streams on a single socket). The first is included for compatibility with
5862any existing proxies that support this feature - we mostly encourage the use of the second where required.
5963
64+ Another implementation will be provided that uses server-streaming ` fetch() ` requests to receive messages for a given
65+ stream, and a unary ` fetch() ` to send messages. These can be paired with a server-side tools to modify a Java
66+ ` BindableService ` to include pairs of gRPC methods which will be treated by the real server method as a single streaming
67+ method. Some implementation details are likely to be left out, specifically around handling the state of pairing up
68+ messages etc, and naturally any reverse proxy would be required to forward all calls to the same server to be handled
69+ uniformly.
70+
6071## Usage
6172
62- Add ` com.vertispan.protobuf:protobuf- gwt ` to your project dependencies. The version will be based on the
63- protobuf -java build being used, with an integer suffix to allow for packaging changes. For example, current
64- released versions:
73+ Add ` com.vertispan.grpc:grpc-web- gwt ` to your project dependencies, replacing ` io.grpc:grpc-* ` dependencies. The
74+ version will be based on the grpc -java build being used, with an integer suffix to allow for packaging changes. For
75+ example, current released versions:
6576
6677| grpc-java | grpc-gwt | Description |
6778| -----------| ----------| --------------------------------------------------------------------------|
@@ -72,7 +83,11 @@ Replace/exclude any existing grpc-java dependencies with this library. Add an in
7283<inherits name =" io.grpc.Grpc" />
7384```
7485
75- Then, use the gRPC APIs as you would normally. The gRPC-web Channel is available as ` GrpcWebChannel ` in the
86+ Then, generate your own stubs as normal with protoc, taking care to only use the async stubs.
87+
88+ Additionally, one or more ` io.grpc.Channel ` implementation should be picked from the provided dependencies, and passed to
89+ the ` newStub(..) ` method when creating your generated client service.
90+
7691
7792## Building
7893
0 commit comments