Commit Graph

971 Commits

Author SHA1 Message Date
Eric Anderson 2467d618b7 Correct path for dep building short-circuiting 2015-10-23 13:46:37 -07:00
nmittler 6f64999821 Addressing concurrency issue in MessageFramer.
Fixes (hopefully): #991
2015-10-23 13:00:23 -07:00
Carl Mastrangelo f39b67c0e8 Add uri checking 2015-10-23 11:13:03 -07:00
Kun Zhang efac679abc NameResolverRegistry and better-defined target string.
- NameResolverRegistry contains all the official NameResolvers. Users
  can also add custom NameResolvers to it. It looks up NameResolver by
  try-and-fail. It is the default NameResolver.Factory for builders.
  DnsNameResolver.
- Pass target as Strings instead of URIs from the channel builder to
  ManagedChannelImpl. A target string is not necessarily a valid URI, in
  which case ManagedChannelImpl will add "dns:///" to the beginning of
  the target and use it as URI.
- DnsNameResolver will require scheme "dns" to be present. It no longer
  allows scheme-absent URIs.
2015-10-23 09:37:22 -07:00
Eric Anderson 6dc5e8075b Support OS X on Travis 2015-10-23 09:27:07 -07:00
Kun Zhang 17597ce9cf Pass the initial transportFuture to DelayedStream.
Otherwise, when DelayedStream is created it ends up calling
clientTransportProvider a second time. However, we already have a
transportFuture available, we should just use it instead.
2015-10-22 17:00:35 -07:00
Eric Anderson 33e26cdaa4 Delete ManagedChannelImplTest.transportFailsOnStart
transportFailsOnStart was still flaky. By looking at history, it became
obvious that transportFailsOnStart was created to test two cases we no
longer support: the transport throwing an exception during start and the
transport calling listener.transportShutdown during start. The part of
the test checking throwing an exception was removed earlier.
2015-10-22 15:42:50 -07:00
Carl Mastrangelo 74088c4fb4 Allow authority override to be propagated to Protocol Negotiators 2015-10-22 15:27:07 -07:00
Eric Anderson 16c4c49e94 Fix flake in ManagedChannelImplTest.transportFailsOnStart
The scheduling on another thread led to a race where sometimes the
future wasn't completed by the time isDone() was checked in
ClientCallImpl causing the usage of DelayedStream, which really messed
up what the test was trying to do.
2015-10-22 12:53:30 -07:00
Kun Zhang 942f4c99d8 Load-balancing ManagedChannelImpl.
- Add NameResolver and LoadBalancer interfaces.
- ManagedChannelImpl now uses NameResolver and LoadBalancer for
  transport selection, which may return transports to multiple
  addresses.
- Transports are still owned by ManagedChannelImpl, which implements
  TransportManager interface that is provided to LoadBalancer, so that
  LoadBalancer doesn't worry about Transport lifecycles.
- Channel builders can be created by forTarget() that accepts the fully
  qualified target name, which is an URI. (TODO) it's not tested.
- The old address-based construction pattern is supported by using
  AbstractManagedChannelImplBuilder.DirectAddressNameResolver.
- (TODO) DnsNameResolver and SimpleLoadBalancer are currently
  incomplete. They merely work for the single-address scenario.
2015-10-20 17:28:44 -07:00
Xudong Ma bfbd6e1ec5 Expose unimplemented_method test to interop test client. 2015-10-18 10:48:02 -07:00
Carl Mastrangelo ce93051aad Cover more low hanging fruit 2015-10-16 15:27:59 -07:00
Nathan Naze 80eb60080d modify .gitignore to ignore Emacs files 2015-10-16 13:24:37 -07:00
Xudong Ma 5667f0e3a6 Add "using std::to_string" to java_generator.cpp, it is needed by internal version. 2015-10-16 09:32:36 -07:00
Xudong Ma b121c46b42 Reduce OkHttp dependency, copy all the needed files into our repository. 2015-10-15 16:35:08 -07:00
Xudong Ma 6d296e84b6 Upgrade OkHttp to 2.5 2015-10-15 16:35:08 -07:00
Xudong Ma b1430aeda8 Expose timeout_on_sleeping_server test to interop test client. 2015-10-14 16:31:25 -07:00
Eric Anderson a62db8f283 Update comment; Parser was replaced with NanoFactory 2015-10-14 13:54:23 -07:00
Eric Anderson 1ee336d244 Use one codegen class for all Nano factories
This reduces the number of classes defined, which reduces memory usage.
It also reduces the number of methods defined, which is important
because of the dex limit.

This should have virtually zero performance degration because the
contiguous switch uses tableswitch bytecode.

ARG_IN_ and ARG_OUT_ are prefixes as otherwise there could be a name
collision with an oddly-named method. Since the other fields are
prefixed with METHOD_ they can't collide.
2015-10-14 13:53:22 -07:00
Carl Mastrangelo 8138308cdb Up code coverage for Metadata 2015-10-13 16:21:44 -07:00
Xudong Ma 72a0a38182 [okhttp] Make sure transportShutdown() always be called before calling transportTerminated(). 2015-10-12 16:34:55 -07:00
Carl Mastrangelo 6474938fe7 Allow non-host based authorities in OkHttp transport 2015-10-08 15:32:30 -07:00
Xudong Ma 996ea2fc22 Give dependency example for android clients. 2015-10-07 16:08:36 -07:00
Carl Mastrangelo d42a09b0e4 Add authority work around for OkHttp channels 2015-10-07 15:04:49 -07:00
Eric Anderson a61beefc06 Update documentation for CGM, in light of jre8u60
JRE 8u60 is still slow, but could be used by someone that doesn't care
about performance now. Added more details about relative performance so
that the gains of OpenSSL are clear.

Added detail about version independence, because JRE 8u60 requires an
update to Jetty ALPN, so it is also applicable to this change.
2015-10-07 14:22:27 -07:00
nmittler 6e04c3100e Adding consistent exception handling for Netty
NettyClientHandler currently handles non-HTTP/2 exceptions properly by forcing a shutdown of the connection.  We need to do the server-side as well.

Fixes #1097
2015-10-05 11:46:50 -07:00
Carl Mastrangelo 2d067edf85 Allow host authority override. 2015-10-02 11:00:43 -07:00
Kun Zhang bb113ad721 Use timeout when verifying setDecompressionRegistry()
because setDecompressionRegistry() could be called from a different
thread than the test thread.
2015-10-01 17:35:04 -07:00
Kun Zhang be400d3ea8 Stub mockTransport.newStream() to prevent NPE. 2015-10-01 16:16:35 -07:00
Eric Anderson a99e97791f Have OpenSSL v1.0.2 available to unit tests 2015-10-01 15:27:18 -07:00
Kun Zhang 89288465c4 Prepare channel layer for upcoming load-balancing changes.
- ListenableFutures of transports, instead of actual transports, are
  passed through multiple layers to ClientCallImpl, so that name
  resolution and load-balancing, which may delay the creation of
  transports, won't block the creation of ClientCall. This also
  simplifies reconnect logic.
- Moved Transport management for a single address to a separate class
  TransportSet. Later, ManagedChannelImpl will own multiple
  TransportSets instead of one.
- ClientCallImpl will buffer requests in DelayedStream until transport
  is ready.
2015-09-29 18:49:38 -07:00
Eric Anderson 9ea70ad29c Update README to reference 0.9.0 2015-09-29 17:57:33 -07:00
Xudong Ma 400926e4e8 [Android-interop-test] Support non-tls test and replace a deprecated API call 2015-09-29 13:53:30 -07:00
Carl Mastrangelo 70cdf76212 adjust other usages in protocol negotiators 2015-09-29 10:57:23 -07:00
Carl Mastrangelo 75e291f062 docs 2015-09-29 10:48:24 -07:00
Carl Mastrangelo cb317c736c Update to share versions 2015-09-29 10:42:12 -07:00
Carl Mastrangelo ff19d90bb8 Force http2 connection when using tls 2015-09-29 10:38:26 -07:00
Eric Anderson 2a98c2eee9 Replace broken link in example 2015-09-28 14:43:36 -07:00
Carl Mastrangelo 46c18ea237 Move decompressor setting down into the AbstractStream 2015-09-28 10:25:58 -07:00
Xudong Ma f7f57b79c9 Put nano generated code into nano package, unless option javanano_use_deprecated_package is set.
Also fix the behaior while java_package is set to empty.
2015-09-28 09:49:02 -07:00
Xudong Ma f15f672b79 Correct the order of arguments. 2015-09-25 17:36:06 -07:00
Nathan Mittler d7cdcc6199 Merge pull request #1071 from nmittler/flaky_test
Fixing flaky test Http2NettyTest.deadlineExceeded()
2015-09-25 10:40:41 -07:00
nmittler 7c2ff632cd Fixing flaky test Http2NettyTest.deadlineExceeded()
This test occasionally flakes due to the way the deadline timer cancels the stream. Stream cancellation immediately closes the outbound status, disallowing the sending of further messages.  The true cancellation is done sometime later in the transport thread in Netty. So there is a race between closing the outbound status and performing the actual cancellation where sent messages will fail with the wrong status.
2015-09-24 16:22:46 -07:00
Eric Anderson d04994f044 Update Windows building instructions for proto3b1 2015-09-24 15:50:28 -07:00
Xudong Ma ea4eed57b9 Reduce memory usage in test. 2015-09-24 15:06:35 -07:00
Nathan Mittler 5fc954bf04 Merge pull request #1069 from nmittler/readme
Adding homepage and mailing list to the README
2015-09-24 12:59:08 -07:00
nmittler b7a72c1618 Adding homepage and mailing list to the README 2015-09-24 12:32:45 -07:00
nmittler f0d95798f8 Updating Netty to send a single SETTINGS frame.
Fixes #1059
2015-09-24 10:42:57 -07:00
nmittler e13d1dc3f5 Fixing benchmarks. 2015-09-24 10:18:24 -07:00
Carl Mastrangelo 70fbd6735a Remove unused function in netty test 2015-09-23 15:15:31 -07:00