Commit Graph

575 Commits

Author SHA1 Message Date
Xudong Ma ffcc5f29c0 Remove unused imports.
to make CheckStyle happy.
2015-05-28 16:10:20 -07:00
Xudong Ma 926a2c168a Add compute_engine_creds test.
Fixes #455

Manually tesed by running on GCE (for both netty and okhttp):
./run-test-client.sh --server_port=443 --server_host=grpc-test.sandbox.google.com -
-server_host_override=grpc-test.sandbox.google.com --default_service_account=155450119199-r5aaqa2vqoa9g5mv2m6s3m1
l293rlmel@developer.gserviceaccount.com --oauth_scope=https://www.googleapis.com/auth/xapi.zoo --test_case=comput
e_engine_creds
2015-05-28 15:56:49 -07:00
nmittler 2483009fe3 Renaming AUTH_README.md to SECURITY.md
The doc discusses TLS as well as auth, so "AUTH" doesn't seem quite right.
2015-05-28 14:01:44 -07:00
nmittler 59f6f45cc4 Switching to Netty's ALPN support.
Also adding documentation for using gRPC with TLS-ALPN within Jetty.

Fixes #180
2015-05-28 13:04:10 -07:00
nmittler f770ffb18f Making test certs more shareable
To use the test certs a module has to depend on the grpc-interop-testing module, which doesn't really make sense.  I'm moving the certs to the grpc-testing module, which is meant to be a sort of testing common area for all of our modules.
2015-05-28 11:34:25 -07:00
Xudong Ma 2fe279f7c2 Add SelectedProtocolQuerier to get protocol selected by NPN on Android.
Fixes #467

Manually tested by using NPN on Android 4.3 (api level 18) talk to GFE.
2015-05-27 17:16:44 -07:00
Eric Anderson 1eb16d94fc Add download and usage instructions 2015-05-27 13:04:15 -07:00
Louis Ryan 641fc288fc Add support for indeterminate length messages. This will make using GRPC easier for non-proto payload types.
Sync to head
2015-05-26 15:44:46 -07:00
Eric Anderson b0619c4c38 Update version to 0.8.0-SNAPSHOT for next cycle 2015-05-26 13:40:13 -07:00
Eric Anderson d9ba2066d4 Release commit for 0.7.0 2015-05-26 13:36:48 -07:00
Xudong Ma 6affc8dcd5 upgrade okhttp to 2.3 2015-05-22 16:45:13 -07:00
zsurocking 4f3641caeb Merge pull request #445 from zsurocking/master
Update AUTH-README.md with Android TLS/ALPN
2015-05-22 13:34:48 -07:00
zsurocking c6ee28cd35 Update AUTH-README.md 2015-05-22 13:34:31 -07:00
nmittler 74cfe6c495 Adding alpn_boot configuration to the parent build file.
This allows all modules access to the alpnboot jar without having to copy&paste the configuration.
2015-05-22 13:05:35 -07:00
zsurocking d09b16d065 Update AUTH-README.md 2015-05-22 11:05:41 -07:00
Xudong Ma 0d480879e5 okhttp: outbound flow control.
Fixes #371
2015-05-21 23:05:54 -07:00
jonathanlin e50f671f1d Change OkHttpClientTransport#start to construct a Socket with the hostname and port if the address is unresolved. 2015-05-21 16:43:22 -07:00
Eric Anderson 5a8e9f4084 Document our findings about GCM performance
We'll probably change our recommendations later to suggesting
netty-tcnative or maybe even conscrypt, but for the moment simply
documenting the issue is productive to prevent surprises.
2015-05-21 15:02:05 -07:00
Eric Anderson 65d73c0dc2 Don't use reflection for epoll/unix domain sockets
The classes are available, even on Windows. Trying to use them though
won't work. You'll get an error like:
java.lang.UnsatisfiedLinkError: no netty-transport-native-epoll in java.library.path
2015-05-21 13:09:24 -07:00
Eric Anderson 3af3d1bee3 Improve invalid argument message for address 2015-05-21 11:33:08 -07:00
Eric Anderson 076532c48b Don't use a list for benchmarks deps
Instead, we can just call compile multiple times; each time just appends
to what is already present.
2015-05-21 11:10:17 -07:00
Eric Anderson 3457199ee3 Fail travis build if codegen isn't committed
This doesn't catch 100% of such problems, as it runs before tests have
been run. However, almost all of our protos are used in 'main' so this
limitation shouldn't be a big deal.

If it does become a problem, we change it from 'before_script' to
'script', but then we'll also need to include gradle build instructions.
2015-05-21 08:33:42 -07:00
Eric Anderson 7d906c569d Fix minor issues with release scripts/documentation 2015-05-20 15:15:18 -07:00
Eric Anderson e03d5c0210 Rename integration-testing to interop-testing
"Interoperability" is a more appropriate name for the tests, since they
are used for testing across different implementations. They will do a
bit of integration testing, like for auth, but this is a smaller scale.

It seems the other languages (Go, C++, Node, PHP, Python, Ruby) are
using "interop" to describe the tests, and the test case specifications
document is named with "interop". After this change, C# will be the only
language calling them "integration" tests.

This change just renames the folder and artifact. We can change the
internal package names later. However, once we do a release, old
artifact names will live forever in Maven Central.
2015-05-20 14:57:36 -07:00
Eric Anderson 7a7450fff9 Commit codegen'd files missing from 43038a5
This allows users to use -PskipCodegen=true
2015-05-20 14:39:00 -07:00
nmittler 65769c26b3 Making client-side negotiation more pluggable. 2015-05-20 14:37:16 -07:00
nmittler 43038a514e Adding support for UDS to benchmarks 2015-05-20 08:40:17 -07:00
Louis Ryan eee86b4fbb Add benchmarks for:
- streaming ping-pong messages per second
- unary response bandwidth in megabits per second
- streaming response bandwidth in megabits per second
- streaming server that obeys outbound flow control
2015-05-19 11:53:46 -07:00
Xudong Ma 7c1dabab5b okhttp: don't crash if receive window_update for an non-exit stream which may have existed.
This fixes #441
2015-05-19 10:27:03 -07:00
Eric Anderson eb85d697c7 Set likely final size of array in toHttp2Headers
We know the size won't be more than serializedHeaders.length, is
unlikely to be fewer, and very unlikely to be substantially fewer. This
prevents us from needing to resize the array in all cases.

Resolves #321
2015-05-19 09:58:17 -07:00
Eric Anderson b69c59ce5f Decrease ArrayDeque memory in SerializingExecutor
By default, ArrayDeque will be of size 16, which is an overkill for most
calls. "4" is not a magical number itself, but seems a better guess than
16 since we do have some knowledge of how much it will contain.

Resolves #320
2015-05-19 09:55:25 -07:00
Xudong Ma 2c7536c8fd okhttp: Enable TLS for Http2OkHttpTest. 2015-05-18 15:11:25 -07:00
Xudong Ma 71447ce7af okhttp: changes for handling unknown stream id.
1. update connection window when receives DATA for existed streams.
2. kill the connection when receives unknown (not exist and never existed) stream id.
2015-05-18 14:15:42 -07:00
zsurocking 7dbd1fe4e4 Update AUTH-README.md 2015-05-18 10:08:54 -07:00
Eric Anderson 98c6355079 Disable Netty eventloop graceful termination
When shutting down the Netty event loop, we have already guaranteed that
all users of it are no longer running. Doing a shutdownGracefully is
just delaying graceful JVM termination by two seconds. This is very
noticeable for short-lived processes, like our integration tests.

We would actually also prefer to shutdown quickly and get a
RejectedExecutionException for any newly queued tasks, because that
would be a legitimate bug.

shutdown() is deprecated, thus we do shutdownGracefully with a timeout
of 0.
2015-05-15 18:19:57 -07:00
Eric Anderson 65291321d8 Make it more obvious JDK 8 is commonly necessary
Resolves #427
2015-05-15 12:07:28 -07:00
Kun Zhang 568d25dae9 Delete the generated files only before generateProto.
Previously generated files were deleted at configuration time. Running
non-build tasks such as ``clean`` or ``tasks`` would delete the
generated files and tracked by git, which is annoying. Now we delete
them only before the ``generateProto`` task, which solves the problem.

After this change, the case that ``generateProto`` is not executed at
all, is no longer covered. However, it is much less likely than the
still-covered case that ``generateProto`` is not re-generating all files
due to misconfiguration.
2015-05-15 10:37:57 -07:00
Louis Ryan 2a58bf8c34 Add more JUnit annotations to list of methods checkstyle will ignore 2015-05-15 09:29:46 -07:00
Louis Ryan d54911713a Implement writes to the channel using a dedicated write queue which allows for efficient flush
coalescing
2015-05-15 09:20:13 -07:00
nmittler c4c6c145af Fixing benchmarks build on non-linux systems. 2015-05-14 16:43:17 -07:00
nmittler 8f537e3ec6 updates to test native epoll 2015-05-14 15:33:55 -07:00
Xudong Ma c3125bebdb okhttp: send reset when client receives halfClose from server before sending halfClose.
So that the server side stream can be fully closed.

This fixed #300
2015-05-14 12:05:51 -07:00
nmittler 5efbb6fe73 Allow 100 streams initially rather than 10.
The HTTP/2 spec suggests 100 as the recommended minimum for SETTINGS_MAX_CONCURRENT_STREAMS (https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-6.5.2).  We should use this value as our default.
2015-05-13 14:22:46 -07:00
Kun Zhang 8bc992091c Add Dockerfile for codegen distribution 2015-05-13 07:58:41 -07:00
Kun Zhang 9805e27569 Add property ``protoc=/path/to/protoc``
This allows people who cannot run the pre-compiled ``protoc`` pulled
from Maven Central to use their own ``protoc``.

Upgrade to protobuf-gradle-plugin:0.4.1 to display error messages of
protoc failures.
2015-05-12 17:34:40 -07:00
Eric Anderson 1787106cc7 isReady() should return false until stream allocated
isReady() can provide pushback while the call is in progress, but it
can also provide the pushback necessary when the client creates more
streams than permitted by MAX_CONCURRENT_STREAMS.

As part of this commit, OkHttp is now calling onReady() after call
creation (it previously never called onReady()).
2015-05-12 16:41:50 -07:00
nmittler c3fa600eae Fixing compiler warning. 2015-05-12 16:23:39 -07:00
nmittler d5727c7fcd Deferring stream creation until receiving SETTINGS from server.
Additionally:
- Fixed bug where the decoder was given the incorrect encoder.
- Adding proper logging class for client/server.
2015-05-12 15:46:32 -07:00
Kun Zhang 2cdc5e3c47 Fix a bug that checked-in generated code are not re-compiled.
Since commit 287a27a the ``grpc`` codegen plugin must be explicitly
added to the ``plugins`` block of the source set, while it didn't.

Remove the generated code before recompiling it to prevent such issue
from being missed by tests.
2015-05-12 13:55:37 -07:00
nmittler 518b7dbf7c Slight performance improvment for MutableHandlerRegistryImpl 2015-05-12 09:56:45 -07:00