v0.12.0 Release
General:
- Commas are now permitted in metadata values
- Header names are now verified to contain only permitted characters (A-Z, a-z, underscore, dash, and period)
- Addition of
{ManagedChannel,Server}Builder.directExecutor()for low-latency use cases, with specialized handling internally to remove unnecessary locking - Further Compression support
{Client,Server}Call.request()is now defined as thread-safe- Increased unit test code coverage
- Bug fixes
Android:
- Hostname verification on Android, when not providing your own
SSLCertificateSocketFactory OkHttpChannelBuilder.overrideHostForAuthority()is deprecated; useoverrideAuthority()which is available on allManagedChannelBuilders- The codegen now places codegen intended for use with JavaNano protobuf in a 'nano' subpackage by default, like JavaNano does, and also observes
javanano_use_deprecated_package - Codegen object allocation optimization for JavaNano protobuf
- No longer referencing internal OkHttp classes; grpc now has its own copy of such classes. This reduces grpc's dependence on a particular version of OkHttp
Servers/Datacenter:
- A strong beginning to client-side load balancing support. No server-side portion is provided, so not widely usable at this time. Providing custom load balancers is supported via
ManagedChannelBuilder.loadBalancerFactory. Expect more in this area in the future - A strong beginning to name resolution support, via
ManagedChannel.forTarget(). Providing custom name resolvers is supported viaManagedChannelBuilder.nameResolverFactory. Currently only DNS is implemented. Expect more in this area in the future - Fixed potential for flow-control deadlocking when activity on one stream is based on another in Netty (#1175)
- Fix Netty transport failing to close all calls when notified that the TCP connection dropped (#1251)
Context:
Contexthelpers forExecutors:Context.wrap(Executor)andContext.propagate(Executor). The former uses the current context whereas the latter uses the currentContextwhenExecutor.execute()is calledContextno longer maintains a stack of attachments and now just maintains the "current". Now,attach()returns the previously-attachedContextwhich is then required to be passed toContext.detach(). This allows naturally restoring a consistent state when applications have bugs when attached/detachingContexts- During cancellation
Contextnow notifies all its direct listeners before notifying child contexts - Initial support for
Contexton both client and server. For client, the currentContextduring new call creation will be the current context during callbacks. For server, a newContextis created for each incoming call and cancelled when server responds