Skip to content

1.1.1 Release

Compare
Choose a tag to compare
@carl-mastrangelo carl-mastrangelo released this 01 Feb 01:50
· 4802 commits to master since this release

I am pleased to announce availability of gRPC Java 1.1.1, the next minor release of gRPC. This includes several months of changes made since 1.0.3. There are many bug fixes, API improvements, and performance changes in this release.

Major Changes

  • Preview of New Load Balancer API The previous API for implementing a new load balancer had several structural issues (#1600 #2209 #2301 #2302) that made it difficult to assign load intelligently to backends. The V2 API is available for trial use in this release. The classes are suffixed with a "2". They will be renamed in the next release of gRPC, and the the current implementations will be removed. Note that these APIs are still considered experimental and not guaranteed to be stable yet. See the notice.
  • Server Reflection It is now possible to enable server side reflection when using Protobuf generated stubs. This allows remote clients to inquire as to which supported services and methods the server can process. It is currently opt in, by adding ProtoReflectionService to an existing server.
  • New Context Artifact Context, the means by which deadlines and cancellation are propagated across API boundaries is now in its own package in grpc-context. It can (and will) be used for implementing cross RPC state, such as for stats and tracing.
  • Wait For Ready Also known as "fail fast", wait for ready has been implemented as an option in gRPC stubs. This can be used to indicate that an RPC should fail immediately if there are no healthy servers available.
  • Proxy Support It is now possible to use basic HTTP CONNECT style proxy support (23f5a6f)
  • _Service_ImplBase.bindService() is now final. The grpc-io mailing list was notified of our intentions and reasoning. This is a breaking change but is not expected to impact production code. If a test breaks, typically you can just remove the line resembling Mockito.when(service.bindService()).thenCallRealMethod();. If this change causes you pain, please file an issue and we may revisit it.

Minor Changes

  • Many classes have been made final. These classes were previously uninstantiable due to having private constructors, but were possible to use with a mocking framework (such as Mockito). These classes have been made final, and special testing utility classes have been provided for use instead.
  • The generated stub classes have several new methods for indicating max message size.
  • Stub classes also lazily load classes whenever possible. If a stub is generated from a very large proto file, or has many dependencies, this avoids loading them all when possible.
  • Many more examples have been added and clarified. See the examples/ directory.
  • Multiple performance optimizations. gRPC is now more memory efficient, less lock contentious, and less CPU overhead. (24de243, 35c3f81, ca5a402, f78644d, 6d28a93, ea3f506, 8c18a0d, 8b745d9, 6907d81, 1623063, 141eed5, ef4e0f4, 8702185, 496a621, cb1ba5b)
  • Guava collection classes are removed from the library, making it easier for Android users to lower their method count and binary size.
  • Dependencies are upgraded to Guava 20, Netty 4.1.8, and Protobuf 3.1.0
  • Status error messages have been made more clear, and should be easier to diagnose.
  • Numerous small bug fixes
  • Numerous small API changes.

Note that all classes marked @ExperimentalApi and @Internal aren't guaranteed to be API stable, and may be changed without notice. Classes and methods marked @Deprecated should be avoided and may be removed in a later release. Of note is ClientAuthInterceptor, which should be avoided in favor of MoreCallCredentials.