Commit Graph

6489 Commits

Author SHA1 Message Date
Jakob Buchgraber 7ddcdfd26c Define ALPN package as an extra variable, to be reused by subprojects. 2015-02-17 10:46:17 -08:00
Jakob Buchgraber 6ceb37ae4c Add QPS Server and TLS support to QPS Client. 2015-02-17 10:45:27 -08:00
Eric Anderson e26608fe91 Avoid MoreObjects for "old guava" compatibility
Some early grpc users on Android are using a very old Guava. They are
working on upgrading, but it will take time. This alone is not enough
for "old guava" compilibility; expect more to come.
2015-02-13 17:06:46 -08:00
Jakob Buchgraber 44574944b9 Move TLS certificates.
- Move certificates to src/main/resources folder.
- Update the code that loads the certificates to make use of Java's resources API.
2015-02-13 11:37:59 -08:00
Eric Anderson 303482ad3c Fix race in OkHttp test
transportTerminated() is called after closing the streams, so we can't
just wait on the streams and expect it to have been called.
2015-02-13 08:54:50 -08:00
Eric Anderson b55b200408 Add missing dependency to benchmarks project 2015-02-12 17:54:48 -08:00
Eric Anderson 74f231a6dd Remove Guava Service from ClientTransport
OkHttp no longer cancels all calls on shutdown, as we want to allow
graceful shutdown. Such cancelling behavior will likely be provided by
Channel in the future.
2015-02-12 15:20:22 -08:00
Eric Anderson db0d8ad8c4 Only run terminationRunnable once 2015-02-12 15:17:12 -08:00
Jakob Buchgraber 3fd7d0675c Add QPS Client to perform throughput and latency tests. 2015-02-11 17:47:45 -08:00
Eric Anderson 127270bd5f Fix shutdown race with negotiation
If the transport had started but negotiation had not completed then
previously channel would be null and shutdown would have no effect. Now
we set channel eagerly, but use a separate variable for determining if
it is safe for general use.
2015-02-10 12:47:53 -08:00
nabeelmian d2e35b0d02 Added utility class, ForwardingServerListener, that forwards calls to
underlying ServerCall.Listener.

-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=85910420
2015-02-09 13:09:19 -08:00
Eric Anderson 8aa79b39fc Improve thread safety of newStream()
OkHttp should now have a thread-safe implementation of newStream.
Previously 'lock' was not held when checking goAway and the checking in
AbstractClientTransport was redundant.

Netty was thread-safe, but it was very hard to tell what guarantees were
necessary and what guarantees each piece was providing.
2015-02-06 14:12:01 -08:00
Tim Emiola 813112ec42 Moves java overview project to a subdirectory 2015-02-06 13:09:20 -08:00
Eric Anderson c84ef8332e Simplify connection callback handling in Netty
Channel is available immediately after connect(), so register callbacks
immediately instead of delaying.

Setting channel is now delayed until it is actually safe to use.
2015-02-05 13:35:49 -08:00
Eric Anderson e6a7b6c8a9 netty: Don't throw exception on double close 2015-02-04 15:46:28 -08:00
Eric Anderson f3a90cd42b netty: Cancel stream if interrupted during create
Previously streams were being partially orphaned if there was an
interruption during stream creation. To handle cancellation,
AbstractClientStream's cancel() had to be changed remove the
"optimization" otherwise, again, the stream would be orphaned.
2015-02-04 15:46:27 -08:00
nmittler f12996086b Fixing compiler build on OS X (Clang) 2015-01-30 15:03:33 -08:00
Eric Anderson e5269899b7 Have test server print info about test client 2015-01-30 14:22:24 -08:00
Eric Anderson fb28ad235b Improve Gradle build of protoc grpc plugin
A Gradle protoc plugin is used for generating and compiling the grpc
codegen. The code organization was changed to match what Gradle expects.

Proto 3 is now required.
2015-01-30 10:19:32 -08:00
nmittler d0e883ac20 Fixing integration tests
Allowing MessageDeframer.request to be called after the deframer has
been closed.  The stub helpers blindly call request after receiving each
message.
2015-01-30 10:15:30 -08:00
nmittler 89b8d7ff47 Moving decompression to the channel thread. 2015-01-29 14:55:40 -08:00
Eric Anderson 2049e0d618 Have Gradle observe LDFLAGS/CXXFLAGS/CPPFLAGS
This allows building with a private proto installation (one in home
directory or elsewhere) by specifying -I and -L.
2015-01-29 13:17:11 -08:00
Nathan Mittler 0f1e24a7ea Merge pull request #49 from nmittler/example_updates
Updating examples based on recent changes.
2015-01-29 09:57:57 -08:00
nmittler 8bc72b8e9f Updating examples based on recent changes. 2015-01-29 09:57:19 -08:00
Jake Wharton 6a93de9c59 Remove explicit Okio dependency.
The version of Okio that we want is dependent on the version of OkHttp. Let it come transitively through the normal dependency resolution mechanism.
2015-01-27 16:33:25 -08:00
Jake Wharton b5291c937d Add Gradle wrapper for building. 2015-01-27 16:30:48 -08:00
Jake Wharton 46d672902b Remove OkHttp submodule as we now depend on a release version. 2015-01-27 15:43:10 -08:00
nmittler f83145865a Removing all references to "stubby" 2015-01-27 11:25:25 -08:00
Eric Anderson aeeebb7cdb Remove Service API from ServerImpl
Fixes #21
2015-01-27 09:20:24 -08:00
nmittler 19052499f7 Removing Maven build 2015-01-27 08:57:37 -08:00
zhangkun83 03f3f5cd97 Reorder the fields of LogHelper to be consistent with initialization order because blaze would complain about it 2015-01-26 15:56:52 -08:00
Manik Surtani 0ca6584d19 Move to a non-snapshot version of OkHttp 2015-01-26 15:48:14 -08:00
nmittler 02c953e5e0 Migrating run scripts to gradle. 2015-01-26 15:26:11 -08:00
zhangkun83 d54a463871 Add README.md in the compiler directory 2015-01-26 11:33:11 -08:00
Eric Anderson 0077e67274 Remove unused imports 2015-01-26 10:23:05 -08:00
Eric Anderson d0adadbc1f Use proto interface instead of concrete class 2015-01-26 10:23:05 -08:00
Adrian Cole c4a43e6bdc Fixes api drift, addressing inbound flow control. 2015-01-23 08:34:07 -08:00
Eric Anderson ada32b0cb1 Optimize number of DATA frames for unary requests
Resolves #10
2015-01-22 16:45:20 -08:00
zhangkun83 5e6078594b Add test target for codegen.
Make all test messages empty since we are not testing protobuf
generator.
2015-01-22 16:04:02 -08:00
nmittler 02cc5217a2 Fixing @GuardedBy annotation to use the correct lock name. 2015-01-22 12:33:24 -08:00
nmittler de3a13164f Changing gRPC Java inbound flow control model
The goal is to mirror the token-based approach used by the Reactive
Streams API.
2015-01-22 11:46:16 -08:00
nmittler 52f4220395 Adding .gitignore for eclipse files. 2015-01-21 16:14:48 -08:00
Louis Ryan 11026b69cc Fix IntelliJ dependency on generated protobufs 2015-01-20 16:24:52 -08:00
ejona 4de2026492 Fix TODO attribution
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=84172357
2015-01-16 16:23:05 -08:00
Eric Anderson 080e33effd Align server flags with other languages
There are also no longer any required arguments. The argument processing
flow was changed to match that of the client.
2015-01-16 13:13:57 -08:00
Eric Anderson 6239965030 Improve test client for real cert
The test client can now be used against a server that has properly
configured certificates, instead of just the test server. To reach the
test server, the client needs these arguments:
--use_test_ca=true --server_host_override=foo.test.google.fr

Client no longer has any required arguments, although for any given
setup needing to specify at least one argument is highly likely.

The arguments have been improved in general to hopefully be more
orthogonal and match those of other language's test clients.
2015-01-16 13:07:29 -08:00
Eric Anderson f681effce9 Update .gitignore for Gradle 2015-01-16 13:05:01 -08:00
simonma f589a4acbb Remove traces of gRPC v1 protocol vs gRPC v2 protocol.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=84087425
2015-01-16 11:03:38 -08:00
simonma 3df1c33403 Reimplement test "readStatus" since v2 is here.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=84082247
2015-01-16 11:03:36 -08:00
zhangkun 9de8e4b569 Make Java codegen ready for open-source. It can be built with the Github HEAD
of opensource protobuf.

- Moved to third_party under GRPC Java directory
- Using Gradle to build
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=84053803
2015-01-15 13:42:49 -08:00