Commit Graph

5126 Commits

Author SHA1 Message Date
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
ejona 7235a396b8 Remove Service API from ChannelImpl
This change loses asynchronous notification of channel state-change and
a way to wait until the channel is actually connected. Both of these are
expected to be added back as part of a health API. The important
distinction from Service is that ChannelImpl never permanently fails and
can revert from being started to connecting again.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83875407
2015-01-15 13:42:49 -08:00
ejona 198a756b83 Add toString to Headers and Trailers
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83856622
2015-01-15 13:42:46 -08:00
simonma 828f941e99 Remove dependency on guava Lists for initializing list.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83808289
2015-01-15 13:42:43 -08:00
ejona 3a29c98d40 Don't overwrite transportError in DATA processing
There may already be a transportError, in which case we want to augment
it and not overwrite it.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83807747
2015-01-15 13:37:38 -08:00
nathanmittler 11c363a7ae Disallowing message delivery after status has been delivered to the listener.
Summary of changes:

1) Merged the interfaces MessageDeframer2.Sink and DeframerListener into
MessageDeframer2.Listener. This simplifies the interface of
MessageDeframer2 quite a bit.

2) Added a deliveryPaused() handler to MessageDeframer2.Listener, which
is called by the deframer when there is not enough data to read/deliver
the next message.

3) Modified AbstractStream and AbstractClientStream to manage the timing
of when the closed() event is delivered to the listener. The
transportReportStatus ultimately controls this by creating a task to
close the listener. It either runs this task immediately or when the
next deliveryPaused() event occurs.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83620903
2015-01-09 17:00:25 -08:00
yangg f8524a17b8 Add package name to the method string.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83353207
2015-01-08 14:43:24 -08:00
rocking ee86ee41a0 Nano proto and Proto3 do no include fields that have their default values in the wire format.
Avoid using hasxxxx

-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82743695
2015-01-08 14:43:23 -08:00
ejona c0f41920bd Remove gRPC v1 support.
No major refactorings/simplifications were done. Only gRPC v1 support
infrastructure was removed.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82737436
2015-01-08 14:43:23 -08:00
ejona 1c20eb6cef Implement cancel_after_* integration tests
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82734780
2015-01-08 14:43:22 -08:00
ejona 42fcc501b9 Implement empty_stream integration test
The test was going to use a queue like ping_pong, but using a mock
proved much simpler. Thus, I also updated ping_pong to use the simpler
model, because it is useful for the two tests to be similar.

InProcessTransportTest failed for empty_stream due to gRPC v2 issues,
and so instead of ignoring emptyStream() I found the broken tests that
were preventing swapping to gRPC v2 and ignored them instead.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82733943
2015-01-08 14:43:22 -08:00
lryan b09c26b4dd Correctly handle disconnect notifications from Netty.
Previously the code close the HTTP2 streams prior to notifying the
application layer. This was the wrong order as the code depended on
enumerating the open streams to notify the application layer.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82733459
2015-01-08 14:43:22 -08:00
ejona ca749c369f Export test_service codegen source instead of binary lib
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82164712
2015-01-08 14:43:21 -08:00
ejona d4531dae1c Add README
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82154383
2015-01-08 14:43:21 -08:00