Commit Graph

6498 Commits

Author SHA1 Message Date
nmittler d8d8ebd783 Adding logging to NettyClientHandler. 2015-05-06 14:38:22 -07:00
nmittler 64df428e36 Properly removing buffered streams after receiving goAway 2015-05-06 14:24:29 -07:00
Kun Zhang 693a7d2846 Fix the filesets to be checked by checkstyle. 2015-05-06 11:35:08 -07:00
Kun Zhang 111f6dd81e Allow people to skip codegen compilation.
Resolves #357

- Add project property ``grpc.skip.codegen``, which is false by default.
  People who don't change the codegen nor the proto files can set it to
  true so that they don't need to set up C++ compilation.
- Check in all generated files under ``src/generated``.
2015-05-06 09:56:40 -07:00
nmittler 7f73189e56 Always checking MAX_CONCURRENT_STREAMS in
BufferingHttp2ConnectionEncoder.

Currently we don't check this setting when handling a streamClosed()
event. If the setting has lowered prior to this event, the stream
creation could fail.
2015-05-05 19:29:34 -07:00
nmittler a45e0a4767 Cleaning up closing for Netty client/server. 2015-05-05 15:43:22 -07:00
nmittler ef6a2f02d4 Updating to the latest Netty version.
Also re-enabling the gracefulShutdown test now that Netty has been
fixed.
2015-05-05 15:39:21 -07:00
Eric Anderson 041cdb11ed Add Jacoco code coverage
After running tests, you can run jacocoTestReport. The jacocoTestReport
task does not depend on the tests, so they should be run separately.

There is still a lot of noise in the jacoco output since we aren't yet
filtering generated code.
2015-05-05 14:36:00 -07:00
nmittler cde7eaa585 Updating to the latest Netty version. 2015-05-05 11:40:22 -07:00
Eric Anderson 10fb20650d Produce combined JavaDoc, add links, exclude internals 2015-05-05 11:32:15 -07:00
Eric Anderson 00a7192f73 Use CreateStartScripts for integration-testing
This makes it easy to run our test client/server without running gradle
every time. For the moment we run 'installDist' in our script since that
is not performed as part of 'build' or 'assemble'. Once we fix our
scripts and improve the documentation, we can remove running installdist
from our script.
2015-05-05 11:11:49 -07:00
Eric Anderson ad44f0aa62 Make checkstyle fail build by default
It seems almost every developer has caused Travis CI to break due to
checkstyle failures. To prevent further breakages, checkstyle will now
fail the build by default.

Specifying checkstyle.ignoreFailures=true in ~/.gradle/gradle.properties
will turn the failures into warnings, which was the old behavior.
2015-05-05 11:09:45 -07:00
nmittler 80a9dceb19 Adding bin to .gitignore for OSX 2015-05-05 10:15:27 -07:00
Eric Anderson 35cb22dd42 Add comment to satisfy checkstyle 2015-05-05 08:47:00 -07:00
Eric Anderson c8c478ef81 netty: Remove goAwayStatus when client closing
Client closing doesn't really many anything special, since it is still
fully-operational. We don't want a later goAwayStatus() from getting
squelched because we were shutting down.
2015-05-05 08:38:38 -07:00
nmittler 68cba971af Do not fail pending streams when sending GOAWAY.
If the HEADERS have been written to the buffering encoder we should
allow their creation to complete since the HTTP/2 spec does not prohibit
this.
2015-05-04 13:00:11 -07:00
nmittler 64176d5560 Adding outbound flow control for Netty. 2015-05-04 12:19:57 -07:00
Jakob Buchgraber 1af367c786 Remove all blocking from the NettyClientTransport. Fixes #116
Motivation:

We are currently blocking in NettyClientTransport.newStream(...) until the channel is active and/or the TLS Handshake is complete.
In certain cases this may lead to deadlock of the eventloop, see #116 for details.

Modifications:

Remove all blocking by buffering writes until the channel is ready to receive those i.e. it is active, TLS is negotiated or the HTTP to HTTP/2 upgrade was sucessfull.

Result:

No more blocking parts when using Netty on the client side.
2015-05-04 11:50:53 -07:00
Kun Zhang 221c534f11 Fix build on Windows/VC++
- Stop defining custom architectures because VisualCpp toolchain doesn't
  allow it. Reference to built-in architectures 'x86' and 'x86_64' since
  they are supported by all toolchains.
- Remove 'local_arch' from platforms. For unsupported platform, we just
  do not specify the target.
- Target no more than one platform at a time. This simplifies the build
  script a lot.
- Remove the TARGET_ARCHS environment variable. Add system property
  ``arch`` to override ``osdetector.arch``.
- Add ``vc.disable`` to override the default choice of VisualCpp on
  Windows.
- Add ``vc.`` prefix to the properties that are only used with VC++
2015-05-04 09:25:49 -07:00
Eric Anderson b6eb9d763d Don't close streams when sending GOAWAY
This reverts a change introduced in f920bad which caused all streams to
be closed when sending GOAWAY as part of graceful shutdown. This is
because lastKnownId() returns -1 when a GOAWAY has not been received.

The test doesn't pass, but at least appears to revert to the old
behavior. It is unknown if the test fails to pass due to client or
server, but given reports that the old code was working, we are thinking
that server-side GOAWAY handling is what is preventing the test from
passing.
2015-05-01 20:05:18 -07:00
Louis Ryan f2cba89e48 Update Netty to 9d70cf3 to pick up https://github.com/netty/netty/commit/8271c8a which eliminates
explicit flushing from Nettys HTTP2 codec.
2015-05-01 13:00:04 -07:00
Eric Anderson 4a05869db7 Replace Operation*Exception with Status*Exception
Operation is a term no longer used in gRPC. StatusException seems clear
and is concise. Moved out of Status class to remove stuttering.

The return types of as*Exception() is now explicitly the
Status.*Exception type.
2015-05-01 08:43:37 -07:00
Eric Anderson e05885d2aa Swap to Netty's SslContextBuilder
We provide a utility to configure the SslContext for our usage, which we
can change as necessary.
2015-05-01 08:42:12 -07:00
Kun Zhang fd0aed22ce Reorganize build instructions.
- Use headers for instructions for different systems.
- Mention that on OSX 10.10 extra environment variables are needed to
  search in '/usr/local'.
2015-04-30 17:34:02 -07:00
nmittler 7779b4fddf Cleaning up some warnings. 2015-04-30 13:57:38 -07:00
Jakob Buchgraber c5612217d1 Add Openloop Client to Benchmarks. 2015-04-30 12:19:21 -07:00
Eric Anderson 2b33598ec4 Don't overwrite error message if bad headers
If we notice something wrong with the headers, then we choose a nice
error message. But we are accidentally overwriting that message with
additional error details.
2015-04-30 09:59:24 -07:00
Kun Zhang 41940f7ff7 Upgrade to protobuf plugin 0.3.1
The plugin has been published on plugins.gradle.org

Conforming to the Gradle standard that plugin IDs must be name-spaced,
the plugin ID has been changed to com.google.protobuf.
2015-04-29 16:28:50 -07:00
Xudong Ma 69c67042a6 De-flake OkHttpClientTransportTest.pendingStreamFailedByIdExhausted.
Fixes #356
2015-04-29 16:25:22 -07:00
Louis Ryan d8d7908109 Avoid flushing CreateStreamCommand for calls where the client is known to send a payload immediately afterward.
Added simple JMH benchmark for Netty so improvements can be measured
2015-04-29 13:41:15 -07:00
Xudong Ma 157aa0a5f0 Fix breakage due to gRPC java package change: nano -> protobuf.nano 2015-04-29 11:42:21 -07:00
Eric Anderson 9ffc71136e Fix style violations introduced in b2a3f7
The long line is caught by checkstyle so causes Travis-CI to fail.
2015-04-29 08:49:28 -07:00
Eric Anderson 2fb03b07dd Fix style violations added in 986d221
The unused AtomicInteger is caught by checkstyle so causes Travis-CI
to fail.
2015-04-29 08:49:28 -07:00
Eric Anderson 3b54ffadfa Remove stray character that hinded Travis cache 2015-04-29 07:56:04 -07:00
Eric Anderson 815df0b9b9 Include gradle 2.3 in Travis-CI cache
Gradle 2.3 is using a -bin.zip name instead of a -all.zip name like 2.2.
2015-04-29 07:32:18 -07:00
Xudong Ma b2a3f7bd1e okhttp: respect SETTINGS_INITIAL_WINDOW_SIZE in outbound flow control. 2015-04-28 15:31:29 -07:00
Xudong Ma 8a5d927a9a Fix the race between failing and starting pending streams.
Fixes #330
2015-04-28 13:32:46 -07:00
Louis Ryan 986d221eaa Fix issue where close can be called in a reentrant fashion by framer writing causing exception to be thrown by transport 2015-04-28 12:46:48 -07:00
nmittler 29c43c1c2d Upgrading to the latest Netty version. 2015-04-28 10:31:38 -07:00
Louis Ryan f679edcfcc Fix memeory leak in MessageFramer caused by allocation of 'empty' buffers never being released.
The buffers are not empty in reality as the allocators enforce a minimum size
2015-04-28 10:10:00 -07:00
Kun Zhang 2b917e2eae Update to protobuf-gradle-plugin:0.2.1
Remove the workaround for windows paths as [the
fix](2183166d9a)
is included in protobuf-gradle-plugin:0.2.1
2015-04-27 14:14:39 -07:00
Xudong Ma d0aad72441 okhttp: Clean up stream when error happens.
Resolves #279
2015-04-27 14:07:43 -07:00
Xudong Ma 4b00476d33 okhttp: Flushes headers out immediately, so that the server can be aware of the stream before receiving real data (or half close).
Resolves #257.
2015-04-27 13:10:04 -07:00
LisaFC 9fb06670d7 added link to new public proto3 doc 2015-04-27 11:48:19 +01:00
Jakob Buchgraber 67b5bc792a Update QPS Client and Server.
- Support for Streaming RPCs.
- Support for using DirectExecutor.
- Support for specifying a client payload size.
- Support to export the histogram / latency distribution to file,
  so that it can be visualized with a third party tool.
- Support setting the server / client flow control window for the connection and stream.
- Improved output format.
- Update README to include some JVM tuning and profiling information.
- Latencies are no longer reported in nanos, but in micros instead.
- Change warmup period to run the same code as in the actual benchmark.
- Can no longer specify the total number of concurrent RPCs, but instead
  the number of concurrent RPCs per channel.
- Import the .proto file used by the C++ QPS package.
- Code Cleanup.
2015-04-24 17:23:28 -07:00
David Young-Chan Kay bed3057392 corrected references to io.grpc.protobuf.nano package. 2015-04-24 19:50:13 -04:00
Jakob Buchgraber 3a4f4b5a06 Add support for setting the connection and stream flow control window to NettyServerBuilder.
- Updated related comments in NettyServerBuilder and NettyChannelBuilder.
- Fixed related tests in NettyChannelBuilder.
2015-04-24 10:46:50 -07:00
Xudong Ma 2f4aa5a490 Use Status "UNKNOWN" instead of "INTERNAL" when Status.fromThrowable can not find a cause with a status. 2015-04-24 10:52:27 +08:00
Louis Ryan f7010f2eac Use message size as a hint to the allocator for buffer capacity.
Set upper and lower bounds for Netty & OkHttp allocators based on transport limitations and benchmark results.
Fix OkHttp OutboundFlowController to chunk payloads larger than frameWriter.maxDataLength
Allow OkHttp to allocate buffers to FrameWriter larger than max DATA length
2015-04-23 16:58:43 -07:00
Kun Zhang a8ef36af16 Create DEPLOYING.md that documents instructions for deploying artifacts.
Move deployment instructions of compiler/README.md there too.
2015-04-23 13:49:26 -07:00