You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+96Lines changed: 96 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -210,6 +210,102 @@ running on Compute Engine or from your own desktop. To run the example on App En
210
210
the code from the main method to your application's servlet class and change the print statements to
211
211
display on your webpage.
212
212
213
+
gRPC Java Datastore Client User Guide
214
+
-------
215
+
In this feature launch, the [Java Datastore client](https://github.com/googleapis/java-datastore) now offers gRPC as a transport layer option with experimental support. Using [gRPC connection pooling](https://grpc.io/docs/guides/performance/) enables distributing RPCs over multiple connections which may improve performance.
216
+
217
+
#### Download Instructions
218
+
Instructions:
219
+
1. Clone the grpc-experimental branch from GitHub:
Setting the transport options explicitly to `GrpcTransportOptions` will signal the client to use gRPC instead of HTTP when making calls to the server.
253
+
254
+
To revert back to the existing stable behavior and transport, simply remove the transport options line or replace it with `HttpTransportOptions`. Please note this will require an application rebuild and restart.
255
+
Example:
256
+
```java
257
+
// will default to existing HTTP transport behavior
Note: client instantiations that already use `setTransportOptions` with `HttpTransportOptions` will continue to have the same behavior. Only transports that are explicitly set to gRPC will change.
274
+
275
+
#### Verify Datastore Transport Options Type
276
+
To verify which type of TransportOptions you have successfully configured, you can use the below lines of code to compare transport options type:
There are new gRPC specific features available to use in this update.
287
+
288
+
##### Channel Pooling
289
+
To customize the number of channels your client uses, you can update the channel provider in the DatastoreOptions.
290
+
See [ChannelPoolSettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.grpc.ChannelPoolSettings) and [Performance Best Practices](https://grpc.io/docs/guides/performance/) for more information on channel pools and best practices for performance.
0 commit comments