Commit Graph

425 Commits

Author SHA1 Message Date
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
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
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
Kun Zhang 3ddd1d525f Log stack traces of test failures to the console.
By default we have to open a HTML page in a browser to see the details,
which is not possible if the test was run in Travis.
2015-04-22 14:49:43 -07:00
nmittler 3ecbd0456a Upgrading to latest Netty version.
This is to resolve the issue of receiving frames for closed (and
therefore missing) streams.
2015-04-22 10:46:07 -07:00
Eric Anderson fc3e41674b Propagate explicit flushes through MessageFramer
MessageFramer allows queing of data and explicit flushing. Sinks
generally can benefit from knowing when they are required to flush, so
we now tell them when MessageFramer received a flush so they only have
to flush when required.
2015-04-21 10:29:08 -07:00
Kun Zhang af18876713 Upgrade to com.google.protobuf:protobuf-gradle-plugin:0.1.0
Commit 76f0a09 after the previous release
(ws.antonov.gradle.plugins:gradle-plugin-protobuf:0.9.1) defers the
generation of generateProto tasks to post-evaluation of the project,
which make them no longer available in the evaluation phase. We need to
move the manipulation of these tasks to post-evaluation too.
2015-04-20 10:35:11 -07:00
Nobutaka Takushima 9528a275ac Fix protobuf-nano build broken by 3666de4427 2015-04-20 11:43:06 +09:00
Kun Zhang 4bc2d6d9a4 Remove call sites of Os.isFamily(). Use osdetector instead 2015-04-17 16:35:23 -07:00
Kun Zhang 0c2ea1550b Fix Mac build failure introduced by commit da3c3f8
- Add -lprotobuf etc to linker.args if libprotobuf.a etc doesn't exist in
  LDFLAGS
- install does not do architecture and dependency check on the artifacts,
  because it may produce non-publishable artifacts due to the above
  change.
2015-04-17 16:32:13 -07:00
zhangkun83 da3c3f8ced Solution for GRPC codegen deployment. 2015-04-16 15:07:36 -07:00
Eric Anderson 23aac9e9ec Fix netty closure check
During Service removal a condition was inverted but incompletely, which
caused the Netty server to never shutdown.
2015-04-16 12:29:24 -07:00
Eric Anderson 4f4f8e40bf Remove Guava's Service from server transport
ServerImpl.start() now throws IOException to make the error explicit.
This was previously being papered over by wrapping the exception in
RuntimeException.
2015-04-16 11:28:04 -07:00
nmittler f920badc5e Upgrading to the latest Netty version. 2015-04-16 08:42:56 -07:00
Xudong Ma 883eb62de4 OkHttp: Temporally support multiple h2-xx protocol on client side.
Since the user provided SSLSocketFactory (especially in Android) may already do the handshake when creates the SSLSocket, and it may choose a different protocol name other than the one OkHttp is using.

Resolves #293
2015-04-16 09:04:19 +08:00
Xudong Ma 1066222eba De-flake transport test.
See #289 for more detail.

I can't reproduce the failure locally, so my guess is that our TIMEOUT is too short for Travis, when the Travis machines get high CPU usage or short of memory (and causes full GC), we should tolerate longer waiting time.

I'm not sure whether this change can fix the flakeness, but I'd like to give it a try.
2015-04-15 09:33:36 +08:00
Eric Anderson 5b2e336b6f netty: Add option to set MAX_CONCURRENT_STREAMS 2015-04-13 13:46:36 -07:00
Eric Anderson 844d207823 Add missing projects to grpc-all
Protobuf was recently moved into its own project and should have been
added to grpc-all at that time. Nano has always been absent.
2015-04-13 08:54:01 -07:00
Eric Anderson 3666de4427 Use more precise names for protobuf and nano
io.grpc.nano sort of seems like a "small" version of grpc-java. And
io.grpc.proto could also mean multiple things. Using "protobuf"
and "protobuf nano" gets us consistent names that are still
understandable, predictable, and more similar to protobuf project
itself.
2015-04-10 16:35:23 -07:00
Eric Anderson e23f899491 Split protobuf into its own project
We don't want core to depend on protobuf.
2015-04-10 15:50:56 -07:00
Eric Anderson 1e257c440e Remove unused local variable 2015-04-10 08:58:43 -07:00
Eric Anderson d077290c40 Fix warnings (JavaDoc and [deprecated]) 2015-04-09 18:05:31 -07:00
Kun Zhang 0d89d3d1bc Fix the issue where the intecepting call fails in start(), does not
call super.start(), and makes the subsequent use of other methods on the
call throw IllegalStateException.

Create ClientInterceptors.CheckedForwardingCall that handles exception
in start logic.

Create Forwarding[Server]Call[Listener] for generic decoration use
cases, with an abstract delegate() for flexibility.

Create SimpleForwarding[Server]Call[Listener] to replace now deprecated
forwarding classes.
2015-04-09 15:56:03 -07:00
Kun Zhang 90706dc48f Rename the codegen binary from java_plugin to protoc-gen-grpc-java 2015-04-09 15:24:46 -07:00
Jakob Buchgraber e8afa3ca23 Fix bug where the stream id would not get incremented for buffered streams. 2015-04-09 13:04:39 -07:00
Xudong Ma 9d214637e6 Temporally support Http protocol name "h2-16" for OkHttp client.
Fixes #22 for real.

Manually tested with jdk8 by:
./run-test-server.sh
./run-test-client.sh --server_host_override=foo.test.google.fr --use_test_ca=true --use_okhttp=true
2015-04-09 13:50:18 +08:00
Xudong Ma 775829a1b2 okhttp: Reset stream when receiving window is negative.
Resolves #215
2015-04-09 09:07:59 +08:00
Eric Anderson fd7ba566aa netty: Use the bootstrap ClassLoader for ALPN/NPN
If ALPN.class isn't in the bootclasspath, we don't want to find it as it
won't work. Also, if someone has fiddled with ClassLoaders, we really
want to make sure we get the proper ALPN class.

Passing "null" to Class.forName() means "bootstrap class loader". In
fact, ClassLoader.getParent() says, "Some implementations may use null
to represent the bootstrap class loader."

We must load the Proxy in the bootstrap class loader as well, because
our class loader may not have access to ALPN.{Client,Server}Provider,
for the same reasons as above. Even if we have multiple instances of
gRPC (due to class loaders), combined they will only create two Proxy
classes: one for ALPN.ClientProvider and one for ALPN.ServerProvider.
2015-04-08 15:37:44 -07:00
Jakob Buchgraber 44f9904ab0 Replace 'internal' import with correct one.
The errornous import was introduced by my previous commit 5f70a12cfc
2015-04-08 12:54:30 -07:00
zhaohaifeng 63db06850e Add simple HelloWord example handling custom header 2015-04-08 08:45:06 -07:00
Xudong Ma f3ccdd99f1 Fixes Travis breakage 2015-04-08 13:00:09 +08:00
Xudong Ma c2f039411a TLS support for okhttp transport.
Resolves #22

Add an API to let users specify ConnectionSpec.
2015-04-08 12:41:35 +08:00
Jakob Buchgraber 5f70a12cfc Remove blocking on client stream creation and buffer RPC Calls for when the MAX_CONCURRENT_STREAMS limit is hit. Fixes #118 2015-04-07 17:06:21 -07:00
Jakob Buchgraber ce860f9003 fix compile error introduced by previous commit 2015-04-07 13:00:24 -07:00
Jakob Buchgraber 105964bfac Fix memory leak by adding the Http2StreamRemovalPolicy to the channel pipeline.
In benchmarks we would see grpc talking up tens of gigabytes of memory. A heap dump
revealed that streams would not get cleaned up and stick around in memory forever.
2015-04-07 12:56:27 -07:00
Xudong Ma fcf1517054 Respect MAX_CONCURRENT_STREAMS in OkHttp client.
If a newStream is called  while MAX_CONCURRENT_STREAMS is reached, then get the call blocked and the request queued, until:
1. a running stream closed, and this newStream() request is accepted.
2. receives go-away from server, fail all pending new stream requests.
3. the available ids are exhausted.
2015-04-07 09:53:47 +08:00
Xudong Ma 9aae6f65fa checkstyle change:
1. Adds <property name="separateLineBetweenGroups" value="true"/> to CustomImportOrder to enfore blank line between imports groups.
2. Uses checkstyle 6.5, which fixed a bug of "CustomImportOrder checks import sorting according to ASCII order instead of case-insensitive alphabetical order".
2015-04-07 08:27:48 +08:00
Eric Anderson 45682dbc18 Hold lock while reading isThreadScheduled
isThreadScheduled is @GuardedBy("internalLock").
2015-04-06 14:13:49 -07:00