Commit Graph

55120 Commits

Author SHA1 Message Date
nnoble 5b7f32a2bb Improving Makefile support for shared libraries.
-) 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
2014-12-29 17:10:46 -08:00
ctiller 521039327f Update build.json, fix opensource build.
Change on 2014/12/20 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82580775
2014-12-29 17:09:27 -08:00
ctiller 09cb6d5651 Build debug/optimized builds into different target directories.
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
2014-12-29 17:08:09 -08:00
chenw 97fd9e56d2 Add SSL root for production GFE.
Change on 2014/12/19 by chenw <chenw@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82554526
2014-12-29 17:06:52 -08:00
ctiller 3bf466fb6c Port [] alarm management to GRPC.
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
2014-12-29 17:05:35 -08:00
jboeuf 1a809c0ebb Adding support for service account credentials.
- 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
2014-12-29 17:03:04 -08:00
yangg 3f1af6ee2d Make override hostname an argument for testing against prod gfe.
Change on 2014/12/19 by yangg <yangg@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82544544
2014-12-29 17:00:21 -08:00
yangg 59dfc90f57 Client side implementation of creating channel with credentials.
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
2014-12-29 16:59:06 -08:00
klempner c463f746c9 Pre allocate client side strings per channel for method, scheme, path, and
authority.

For method and scheme, move these from channel to http_client_filter.
	Change on 2014/12/19 by klempner <klempner@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82536909
2014-12-19 13:49:05 -08:00
ctiller 186cdab82e Don't allow trailing metadata from the client.
Change on 2014/12/19 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82527952
2014-12-19 13:23:35 -08:00
mlumish 7d4ec77c17 Removed reference to custom install location
Change on 2014/12/19 by mlumish <mlumish@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82518240
2014-12-19 13:21:31 -08:00
temiola 21bb60cf4d Exposes event#finish as #close.
- ensures that it's a runtime error if an event if used after it's finished

- updates all calls where the completion_queue is used to ensure the event's
retrieved are explicitly finished
	Change on 2014/12/18 by temiola <temiola@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82445748
2014-12-19 13:16:21 -08:00
yangg da029e39b6 Add a test where client side sees a deadline expired status.
The test is not completely right and I filed [] to track it.
	Change on 2014/12/18 by yangg <yangg@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82442464
2014-12-19 13:14:58 -08:00
ctiller 336bf21127 Fix opensource build test.
It's a string of unit tests, so size should actually be small. Setting timeout
to long means we have 15 minutes to test everything, which should fit for now.

Also fixes a compile error.

Once this goes in, TAP should start running our tests again.
	Change on 2014/12/17 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82395309
2014-12-19 13:13:37 -08:00
ctiller bcd6259a95 Properly handle cancellation during downwards propagation.
Change on 2014/12/17 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82395253
2014-12-19 13:12:23 -08:00
pmarks b74550655a gRPC: Avoid AF_INET6 sockets when the ::1 loopback address doesn't exist.
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
2014-12-19 13:11:09 -08:00
ctiller 40260c4d5b Allow overriding httpcli behavior by tests.
Change on 2014/12/17 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82379331
2014-12-19 13:08:41 -08:00
yangg 246ec3bd3a Set host to channel's target when creating a call.
Change on 2014/12/17 by yangg <yangg@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82377896
2014-12-19 13:07:20 -08:00
yangg fd2f3ac91d Sync up open source build with []
Change on 2014/12/17 by yangg <yangg@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82377745
2014-12-19 13:05:56 -08:00
ctiller d79b4865ce Introduce the (outside-of-iomgr) pollset API.
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
2014-12-19 13:04:38 -08:00
yangg a4b6f5df94 Add ServerContext. It is currently empty and deadline and metadata will come to
it in subsequent cl's.
	Change on 2014/12/17 by yangg <yangg@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82372934
2014-12-19 13:02:04 -08:00
yangg 081e2b0e63 Replace the deprecated grpc_call_accept calls with the equivalent two new
calls.
	Change on 2014/12/17 by yangg <yangg@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82368034
2014-12-17 15:55:56 -08:00
nnoble 4cb93718c7 Changing compilation ordering to fix dependency issue between generated files and their inclusion.
Change on 2014/12/17 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82363995
2014-12-17 15:55:11 -08:00
ctiller cd0569a16c Fix include guards.
Change on 2014/12/17 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82354016
2014-12-17 15:53:55 -08:00
vpai 80b6d014ad Prepare QPS tests for running in GCE
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
2014-12-17 15:52:15 -08:00
nnoble 9ebc9b71ce Fixing chicken-and-egg dependency by putting the openssl dependency first, in order to make sure headers are present.
Change on 2014/12/17 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82349094
2014-12-17 15:50:54 -08:00
ctiller 2bbb6c4311 Remove endpoint/ directories.
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
2014-12-17 15:49:42 -08:00
jboeuf ab4f91458b Adding JWT generation and signing code for service accounts credentials.
Change on 2014/12/16 by jboeuf <jboeuf@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82279249
2014-12-16 17:26:10 -08:00
rsilvera 081e3200c8 Add missing casts to enable compilation with gcc 4.7
Change on 2014/12/16 by rsilvera <rsilvera@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82275653
2014-12-16 17:25:22 -08:00
nnoble 20e2e3fba8 The built-in ssl target now properly merges the archives instead of nesting them.
Change on 2014/12/16 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82273781
2014-12-16 17:24:05 -08:00
yangg fb3aa26c0e Fix comments regarding call_accept to reflect current API.
Change on 2014/12/16 by yangg <yangg@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82273000
2014-12-16 17:22:43 -08:00
chenw 69ca59fa74 Add slow client consumer test case for flow control test.
The client will sleep 500 milliseconds before read next message in reponse streaming.
	Change on 2014/12/16 by chenw <chenw@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82265748
2014-12-16 17:20:09 -08:00
ctiller 769b70ba9d Make alarm initialization take a timespec now.
This will allow combining of gpr_now() calls, and make it easier to test the
alarm code in the future.
	Change on 2014/12/16 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82246768
2014-12-16 17:13:37 -08:00
nnoble 5447c5461c Tweaking solution settings to be able to compile with OpenSSL (not link yet), and swapping per-project properties for a global property sheet.
Change on 2014/12/16 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82245026
2014-12-16 17:12:17 -08:00
nnoble 8a23a3d96a Replacing pthread_once by gpr_once, in the opensource conversion.
Change on 2014/12/16 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82243767
2014-12-16 17:11:03 -08:00
mlumish a7baac5280 Added support for trailing metadata, fixed status support
Change on 2014/12/16 by mlumish <mlumish@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82239977
2014-12-16 17:09:38 -08:00
ctiller c99774fc7b Remove a (very) deprecated file.
Change on 2014/12/15 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82201880
2014-12-16 17:08:15 -08:00
temiola 5832791292 Adds support for trailing metadata
- removes the status class, replacing it with a Struct
- adds support for trailing metadata, merging into the call's initial metadata

- tracks []
	Change on 2014/12/15 by temiola <temiola@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82193372
2014-12-16 17:05:37 -08:00
nnoble d8fd853cba Fix for the exposed problems after trying a full clean build.
Change on 2014/12/15 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82192594
2014-12-16 17:03:01 -08:00
ctiller 2845cade4c Trailing metadata support.
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
2014-12-16 16:57:49 -08:00
ctiller c6d61c4dd6 GOAWAY & Reconnection support.
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
2014-12-15 15:39:03 -08:00
nnoble 608254011d Avoiding bashisms that'll prevent other shells to run our Makefile.
Change on 2014/12/15 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82177761
2014-12-15 15:38:59 -08:00
vpai 61cba0b29d Add an assertion to prevent return-without-value warning.
Change on 2014/12/15 by vpai <vpai@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82177414
2014-12-15 15:38:51 -08:00
samuelw ca9f359b75 Fix bug with generating grpc c++ code for proto files
containing multiple services.

Hit this experimenting with using grpc to talk to pubsub.
	Change on 2014/12/15 by samuelw <samuelw@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82175646
2014-12-15 14:55:58 -08:00
mlumish 31a829c165 Moved interop client script to the same directory as other scripts. This also moves it into the filegroup for the opensource build.
Change on 2014/12/15 by mlumish <mlumish@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82175252
2014-12-15 14:51:41 -08:00
nnoble 028ddde5d0 Adding build files for OpenSSL.
-) Adding a hand-massaged NMake script generated from OpenSSL's perl scripts.
-) Adding a batch file to invoke it, and only compile the libraries we're interested in.
	Change on 2014/12/15 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82172630
2014-12-15 14:50:19 -08:00
nnoble bba7692b6b Fixing typo that was preventing some targets to build.
Change on 2014/12/15 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82170695
2014-12-15 14:49:02 -08:00
ctiller c1ddffbf1f Add time averaged stats for future alarm list work.
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
2014-12-15 14:47:44 -08:00
ctiller c5abe59fe1 Simplify alarm API.
This change removes a corner case that needs to be handled (what happens if you
add an alarm twice?). This corner case was never used, nor tested.
	Change on 2014/12/15 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82168179
2014-12-15 14:46:23 -08:00
ctiller 64f291008a Fix Makefile help text.
Change on 2014/12/15 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82155747
2014-12-15 14:39:12 -08:00