Fixed any exposed bugs across the stack.
Add a poll() based implementation. Heavily leverages pollset infrastructure to allow small polls to be the norm. Exposes a mechanism to plug in epoll/kqueue for platforms where we have them.
Simplify iomgr callbacks to return one bit of success or failure (instead of the multi valued result that was mostly unused previously). This will ease the burden on new implementations, and the previous system provided no real value anyway.
Removed timeouts on endpoint read/write routines. This simplifies porting burden by providing a more orthogonal interface, and the functionality can always be replicated when desired by using an alarm combined with endpoint_shutdown. I'm fairly certain we ended up with this interface because it was convenient to do from libevent.
Things that need attention still:
- adding an fd to a pollset is O(n^2) - but this is probably ok given that we'll not
use this for multipolling once platform specific implementations are added.
- we rely on the backup poller too often - especially for SSL handshakes and for client
connection establishment we should have a better mechanism ([] []
- Linux needs to use epoll for multiple fds, FreeBSD variants (including
Darwin) need to use kqueue. ([] []
- Linux needs to use eventfd for poll kicking. ([]
Change on 2015/01/07 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83461069
Expand test runner to be compatible.
Change on 2015/01/06 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83378004
This will open the way for CONFIG=tsan, for instance.
Change on 2015/01/06 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83368093
Properly set this up in our build environment.
Change on 2014/12/23 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82725899
-) Properly linking built-in OpenSSL into the grpc library.
-) grpc now properly depends on gpr when linking shared code.
-) Properly naming the shared library with all their aliases.
-) Properly installing the shared library aliases on the system.
-) Potentially supporting Darwin and MINGW32 targets for shared libraries.
Caveat: if using shared libraries, some tests will not compile anymore if they want to use OpenSSL functions, as they are no longer publically available externally. Which is the feature we were seeking.
The Makefile currently does it properly, by linking the tests statically. This only applies when using external code and Makefiles, if said external code improperly assumes SSL is available through grpc.
Change on 2014/12/22 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82656438
This will make auto-running different test configurations a little easier.
Change on 2014/12/19 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82555939
This change implements a platform independent alarm manager in alarm.c.
It's integrated with iomgr, and some tests are cleaned up.
The alarm implementation itself is a fairly direct port of LazyAlarmList from eventmanager.
SpinLock has been replaced for now with gpr_mu, and other atomic operations have been dropped (again, for now).
A majority of tests have been ported.
Change on 2014/12/19 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82551363
- Tested end to end with a JSON key I generated for my account using the
fetch_oauth2 binary.
- The same fetch_oauth2 binary can get a token from the GCE metadata service on a VM in cloud.
Change on 2014/12/19 by jboeuf <jboeuf@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82548689
The old test_ssl_channel related code is deleted and the new create channel
call is used for interop tests.
Change on 2014/12/19 by yangg <yangg@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82540921
On Linux with disable_ipv6=1, we can create sockets bound to [::]:port, yet
connecting to that address triggers an Unreachable error. Since IPv6 is
useless on such machines, it's cleaner to turn it off than expose users to a
half-broken state.
Change on 2014/12/17 by pmarks <pmarks@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82387437
This CL introduces the public side of this interface. There will need to be an
iomgr-private API also, but this will be a per-implementation API and so is not
covered here.
I've taken care of wiring the interface through the codebase in the manner that
I expect it will be used.
Change on 2014/12/17 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82376987
Edit build.json to include qps tests and credentials
Perform required MOE edits for running qps tests in VM
Minor changes to underlying source files to support
issues like more restrictive warning flags in cloud.
Change on 2014/12/17 by vpai <vpai@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82349829
Fold endpoint interface into iomgr, move secure_endpoint into security/.
This will make it easier for endpoint to rely on some iomgr defined types (like
pollset).
Change on 2014/12/17 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82338036
Actually exposing it from the C API.
Also removing grpc_status, since it's mostly useless.
Change on 2014/12/15 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82180546
Clients stay connected to a server after it shutdowns until all active calls
have completed, and then they drop.
After a GOAWAY or a disconnect, clients will attempt to re-resolve and
reconnect to the server.
Change on 2014/12/15 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82178515
This is a trivial C89-ification of the []2 implementation of the same idea.
Indeed the implementation files and tests have been branched from the [] versions.
Change on 2014/12/15 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82168822
The tests compute usable space in the log, but do so using subtraction on unsigned values and did not correctly account for number of blocks used per-core. This could lead underflow, and an incorrect space calculation.
In addition, testing showed that with current defaults, tests would fail on a system with > ~64 cores. This can be alleviated through use of a larger log. An explicit
check in the log initialization has been added for this case, and the log size increased if necessary.
Change on 2014/12/15 by aveitch <aveitch@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82154432
Additionally add rotl, rotr which will be needed to implement some hashing
functions shortly.
Change on 2014/12/15 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82149559
Also fixes a rather embarrassing bug in bin_encoder.c.
Change on 2014/12/12 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82024795
-) Detecting system and embedded presence of zlib and OpenSSL with ALPN.
-) Automatically disabling secure targets if no OpenSSL present
--> make all won't work if no OpenSSL is present, forcing the users to select the nonsecure Makefile targets explicitely.
-) Removing build instructions for OpenSSL - this isn't really necessary anymore.
-) Adding more blurb about OpenSSL and the new Makefile features.
Change on 2014/12/12 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82020890
a disaster and does not support url_safe which we need for the JWT.
Change on 2014/12/12 by jboeuf <jboeuf@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82020601
-) Compiling the proto plugin using the HOSTCC compiler.
-) Set up proper rules to invoke the plugin from protoc.
-) Few various renaming hacks to fully get out of [].
Change on 2014/12/12 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82000361
-) Introducing gpr_vlog so to spare a few vsprintf later (at least one for now)
-) Renaming statistics/log.* to statistics/census_log.* to avoid collisions.
Change on 2014/12/12 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81995756
Safely managing disconnection and goaways needs reference counting at the child channel level, which was near impossible to provide with the previous embedding of the child channel in the client channel.
This is a (hopefully) no-op refactoring to provide that split. The next CL in this series will actually get disconnection and goaway somewhat right.
Change on 2014/12/12 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81985590
Change on 2014/12/11 by jtattermusch <jtattermusch@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81910401
Removed bad format test to fix gpr_string_test.
Also took care of some of the MS compiler warnings when compiling gpr_test_util.
Change on 2014/12/11 by jtattermusch <jtattermusch@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81900639
tests on machines that support AF_INET6 sockets bound to ::1.
Listening on :: or connecting to a mapped address should always work.
Change on 2014/12/10 by pmarks <pmarks@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81837056
To build client in Git-on-[]:
# regenerate Makefile
net/grpc/tools/buildgen/generate_projects.sh
# generate .pb.h and .pb.cc
protoc --cpp_out=. --grpc_out=. --plugin=protoc-gen-grpc=[]-bin/net/grpc/compiler/cpp_plugin net/grpc/cpp/test/interop/test.proto net/grpc/cpp/test/interop/empty.proto net/grpc/cpp/test/interop/messages.proto
# Complile and link
net/grpc/tools/build_grpc_dev.sh bins/interop_client
To test against GFE/ESF:
# bring up server
[] build net/grpc/testing/interop:server_components_env
[]-bin/net/grpc/testing/interop/server_components_env --manual --rpc_port=25000
# start client
/tmp/grpc-codebase/bins/interop_client --enable_ssl=true --server_port="server ssl port listening port"
To test [] build against GFE/ESF:
[] run net/grpc/cpp:interop_client -- --enable_ssl=true --server_port="server ssl port listening port"
Change on 2014/12/10 by chenw <chenw@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81821921
Also, make those checks pass.
Change on 2014/12/10 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81792364
Move eventmanager and platform dependent endpoint functionality into a single
library called 'iomgr'.
This is primarily to prepare for a Windows port - where posix socket semantics
lead to poor quality code.
Mostly this is a code movement CL, with some small changes to help prepare the
way for porting:
- em style fd objects can only be held internally in iomgr, and own their memory
- added grpc_iomgr_create_endpoint_pair() to accomodate the common pattern of
creating a tcp endpoint from the output of socketpair - this will help keep
our tests portable
- separated em alarm interface into a separate file, as this part of event
manager is needed higher up the stack
- made the eventmanager bits a true singleton, simplifying API's across the
stack as there's no longer a reason to carry a pointer there.
Initial design document is here:
https://docs.google.com/document/d/1VmafcHvvrP5kwtQkz84R5yXF7u7fW-9Pn0bkSUQHDt8/edit?disco=AAAAARNByxg
Change on 2014/12/09 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81716456
Change on 2014/12/09 by jtattermusch <jtattermusch@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81704538
Having a BUILD target named chttp2_fullstack_thread_stress_test_test
is deceptive as it is a direct test of the system rather than a test
of a test of the system.
Change on 2014/12/09 by nathaniel <nathaniel@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81688649