Remove 'context' from interfaces/tests/framers/...
Next phases
- Switch the wire format (ESF needs to be done in near lock-step)
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=75164642
Introduces Header and uses it for propagating text-only header values over existing transports
Leaves Context & wire format otherwise unchanged
Next phases
- Remove context from interfaces
- Switch the wire format (ESF needs to be done in near lock-step)
Interface changes are relatively light
Headers class is functional but not optimal
All serialization is done as string until transports expose interface for binary headers
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=75050265
Using MethodDescriptor before was abusive, but the alternative was not
clear.
The new gRPC protocol causes things to become more obvious. Headers,
method name, and timeout were the interesting things on the
MethodDescriptor. In the new protocol, headers are no longer going to be
treated differently from context. We are fine with passing the method
name. So that leaves just timeout, which we really will need more
methods for on the ServerCall object anyway.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=74889759
1. logging.FormattingLogger, change to use java.util.logging.Logger.
2. util.concurrent.SerializingExecutor, make a copy to our code base.
3. io.ByteBuffers, not needed anymore.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=74803598
There is little use in providing the Marshallers directly from the
Definition.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=74790187
The rest of the methods are present tense, so onComplete() is more
appropriate than onCompleted().
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=74703245
Interface changes
- Moves halfClose() from Stream to ClientStream, because it's only valid on the
client and ServerStream already has close().
Implementation details
- Splits the cient-specific logic from AbstractStream and forms
AbstractClientStream.
- Creates AbstractServerStream for server-specific logic
- Creates NettyServerHandler which is the server counterpart of NettyClientHandler
- Refactors NettyClientHandlerTest and NettyClientStreamTest to share code with
NettyServerHandlerTest and NettyServerStreamTest
- Updated NettyServer to work with the transport.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=74347890
Previously, if the active transport had failed but there were still other running transports, we would claim to be shutdown before we actually were (and would end up calling notifyStopped twice).
Also, if a transport immediately failed during startup, we could end up setting activeTransport to the already-failed transport, which meant we would perpetually try to use that broken transport.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=74339777
transportFailedOrStopped() sets activeTransport to null, but
obtainActiveTransport expected it to be non-null because it just set it.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=74264310
This is useful in making sure we don't have stray dependencies and brings us closer to compiling for platforms like Android. We can now remove unwanted dependencies one module at a time, or get individual modules to build on Android.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=73849551
The client Call needs both parameters because it containts start(), but
ServerCall doesn't actually have that same need.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=73662252
This is only a move with appropriate code changes to use the new class
names. The only functional change was changing the visibility of
MethodDefinition's constructor to package-private so ServiceDefinition
could construct it.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=73569974
The idea is that Server would be provided a HandlerRegistry at construction time.
This has a simplistic implementation of HandlerRegistry. If we like the API, then I can implement a lock-less version as we find need.
Most classes are still under Server so that it is obvious what changes were made. Moving things out of Server would be a separate CL.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=73334671
- New Decompressor interface with NettyDecompressor impl. This is responsible for unpackaging and uncompressing the GRPC compression frame.
- New class GrpcDeframer. This is a transport-agnostic class that uses a Decompressor to unpackage the compression frame, and then reads one complete GRPC frame and notifies the listener.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=73068835
1. Use okhttp client transport for okhttp tests.
2. Utilize GrpcClient to construct channel according to the transport type.
3. Remove the unused middle layer abstract tests after above changes.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=72732333
The primary functionality is an interceptor that authenticates calls using oauth. However, most of the changes are for an integration test to make sure the code works with ESF.
This is based on work by lryan and simonma.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=72567773
Everything is nested under a single Server class. This may not seem best, but splitting things up basically requires a lot of "Server" prefixes all over the place, even if we use a separate package. I'm expecting to defer the decision, but once we decide the organization we need to update the Channel API to match.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=71838718
MoreExecutors.directExecutor() or MoreExecutors.newDirectExecutorService()
based on whether the code requires an Executor or an ExecutorService instance.
This is being done to resolve some performance issues with the current
sameThreadExecutor() implementation, by allowing users who don’t need
ExecutorService#shutdown semantics to not pay for them, and to make the costs
more obvious for users who do need them.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=71585920
OkHttpSession is temporally kept for server side using.
Test:
java/com/google/net/stubby/testing/integration/grpc_java_server --port=10009 --transport=http2_okhttp
java/com/google/net/stubby/testing/integration/grpc_java_client --serverHost=localhost --serverPort=10009 --transport=http2_okhttp
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=71436060
transports that can deliver them.
This unblocks sending OAuth2 headers natively
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=71118741
The real solution is to not assume gRPC frame/DATA frame alignment, but
that is a much larger piece of work.
The bug was exposed via talking HTTP/2 to GFE which used a separate DATA frame
for closing the stream.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=70982223
Overview:
- NettyClientTransport - this is the entry point into the client transport. This creates streams as well as the NettyClientHandler
- NettyClientStream - client stream implementation. This sends commands to the NettyClientHandler via commands. Callbacks on the stream are made directly from the NettyClientHandler in the channel thread context.
- NettyClientHandler - A Netty HTTP/2 handler that acts as a bridge between the NettyClientStreams and Netty's HTTP/2 processing.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=70970028
Resurrect integration tests that pass through GFE for HTTP2+Netty
Misc improvements to hexa environment
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=70683236