Commit graph

125 commits

Author SHA1 Message Date
Joel Stanley
89a5547dc0 Add script for circumventing MacOS SIP and using nix-built grpc; upda… (#85)
* Add script for circumventing MacOS SIP and using nix-built grpc; update README.md

* Guard destructive /usr/local and brew updates with a user prompt
2016-12-20 11:37:46 -06:00
Joel Stanley
8a6a7c3715 MONAPP-3634: Improve stack/nix experience and MacOS development environment sanity (#84)
* Update tests.patch

* release.nix fixes for building and running cabal test suite from inside the nix-shell environment

* Update build instructions

* More README updates

* Fix stack tooling and improve documentation

* Update grpc sha256, cleanup build instructions

* Whups, DYLD_LIBRARY_PATH and substituteInPlace is still needed for hydra / macos builds with no brew-installed grpc!

* PR feedback tweaks
2016-12-19 16:53:44 -06:00
Joel Stanley
b78b15ecdb Fix author/maintainer/copyright in grpc-haskell.cabal (#82)
Update LICENSE, update fields in grpc-haskell.cabal
2016-12-14 12:55:56 -06:00
Joel Stanley
90b010d5cb Add DYLD_LIBRARY_PATH to executable environments during postInstall (#81) 2016-12-12 15:45:58 -06:00
Gabriel Gonzalez
c02546f696 Fix grpc-haskell tests for Nix (#80)
This updates the `release.nix` to now correctly run the test suite.  You can
now build and test `grpc-haskell` by running:

```
$ nix-build -A grpc-haskell release.nix
```

... and `nix-shell` has been updated, too, so that you can do `cabal`
development inside of a `nix-shell` by running:

```
$ nix-shell -A grpc-haskell.env release.nix
```

For people who prefer to use `stack` you can still just build the `grpc`
library by running:

```
$ nix-build -A grpc release.nix
```

... then pass that library as input to `stack`
2016-12-12 10:40:23 -08:00
Connor Clark
a54d48542b fix broken test, fix stack.yaml (#78) 2016-12-08 10:10:32 -08:00
jcarey
3530c331f3 Merge pull request #77 from awakenetworks/protobuf-wire-927c61b
protobuf-wire = 927c61b
2016-12-02 09:49:13 -08:00
John C. Carey
f3687d664c protobuf-wire = 927c61b
proto3-wire   = b515191
2016-12-01 22:40:28 -08:00
Connor Clark
1d8f811906 MONAPP-1369: Server options for generated code. (#76)
* add ServiceOptions for generated servers

* drop opt prefix in ServiceOptions fields

* add default options

* tweak exports, add docs

* re-export stuff from Generated so that users need don't need to import lots of modules

* remove threaded from library -- doesn't do anything

* add defaultServiceOptions export

* more exports

* export GRPCMethodType
2016-11-30 14:22:47 -08:00
travis
7d5df1d204 GADT-based high level interface 2016-11-29 13:34:34 -08:00
Travis Athougies
26dc36dc64 GADT-based high level interface 2016-11-17 16:00:07 -08:00
Phil Freeman
507edf803f Merge pull request #74 from awakenetworks/phil/host-option
Add host option to high-level API
2016-10-27 13:53:04 -07:00
Phil Freeman
950f4cdefa Add host option to high-level API 2016-10-26 14:43:11 -07:00
Connor Clark
a12e5ae8a0 update bounds for GHC 8 (#73) 2016-10-24 14:25:08 -07:00
Connor Clark
d18d3251e8 fix up benchmarks to run with latest changes (#72) 2016-08-26 10:21:59 -07:00
Connor Clark
01fac2d5a6 add option to set logging function (#71)
* add option to set logging function

* Add documentation to ServerOptions
2016-08-17 14:12:22 -07:00
Connor Clark
3366dde7ab Connor/security (#68)
* begin security bindings

* secure channel creation

* SSL credentials support

* add client-side ssl support

* ssl test

* read file before passing to channel credentials, free credentials when done creating

* use localhost key/cert for test

* WIP sketch of callbacks for metadata plugins

* conversion from Haskell auth processor to C

* add test for custom server metadata auth processor

* wip auth failure test

* rebase tweak

* working test of custom auth metadata server processor

* improve security docs, clean up

* add unsafe layer client-side auth metadata plugin functionality

* add client config option for custom auth metadata

* WIP client-side metadata auth plugin. Crashing when calling C callback.

* get initial version of client-side metadata plugins working

* replace String with ByteString in a few places, add function for getting AuthProperty

* AuthContext utilities and more documentation

* end-to-end test of client and server auth plugins

* remove redundant tests

* function for parents in unary calls, add deactivated failing test for auth metadata propagation from parent to child

* some cleanup

* tweaks

* more tweaks

* remove unused file

* docs tweak

* consolidate exports

* update protobuf-wire commit
2016-08-17 09:55:06 -07:00
Connor Clark
b9b548d8eb Fix metadata marshalling bug, add QuickCheck properties (#63)
* make metadatamap a newtype of multimap

* update tests for new MetadataMap

* remove multimap dependency, reproduce needed functionality instead

* add repeated key to payload test

* QuickCheck properties for C bindings, fix bug in metadata FFI wrappers

* add quickcheck bound

* fix merge
2016-08-17 09:54:46 -07:00
Connor Clark
d6fb5df411 Update README.md
Add homebrew instructions
2016-08-15 17:24:00 -07:00
Joel Stanley
096d399b30 MONAPP-1035: Fix errant hang on metadata exchange in Haskell client-side bidirectional streaming (#70)
* (wip) Change ClientRWHandler to use an IO action for metadata acqui

* Demonstrate placement of WaitForInitialMetadata() in hellos_client

* Make hellos cpp server always send metadata first, for now

* Show getMD placement in haskell hellos-client

* Add prelim bidi metadata exchange behavior tweaks to line up with C++ API conventions
2016-08-15 12:55:40 -05:00
Joel Stanley
a5614befe3 More reuse between unregistered and registered LL server functions (#67) 2016-08-10 16:38:58 -05:00
Joel Stanley
d7b00ac054 Fix race condition while tracking outstanding handler threads (#66)
* Demonstrate shutdown concurrency bug via unregistered server streaming test

* Comments, cleanup

* Remove extraneous liftIOs from low level tests
2016-08-10 16:14:41 -05:00
Phil Freeman
d618b90481 Merge pull request #65 from awakenetworks/0.15.1-instructions
Update GRPC instructions for 0.15.1
2016-08-09 11:12:23 -07:00
Phil Freeman
f2fa230294 0.15.* 2016-08-09 11:03:19 -07:00
Phil Freeman
bd0e56af94 Update GRPC instructions for 0.15.1 2016-08-09 11:02:46 -07:00
Joel Stanley
9408745254 Streaming interface tweaks (i.e., StreamSend/Recv ops in IO) (#58)
* Add clientRW', StreamRecv', StreamSend' placeholders for IO-based stream ops (instead of Streaming); concurrent hellos Haskell client; hellos client cleanup

* Fix typo

* Rename clientRW' => clientRW; fix unreg bidi testcase

* Replace serverRW operation with one that uses the IO-based stream ops instead of the Pipes.Proxy.Client ops; modify examples accordingly

* Misc formatting, minor restructuring wibbles

* Replace remaining stream send/recv operations with IO-based ops instead of
Pipes.Proxy.Client; DCR; minor style consistency tweaks.
2016-08-09 11:30:47 -05:00
Connor Clark
d66a4f98b3 Update to gRPC 0.15 (#61)
* update channel arg names, add compression level arg support, add compression level arg test

* switch to temp test demonstrating bug in grpc 0.15.0

* memset op array to 0

* switch examples back

* Switch to newer `grpc` and enable tests in `release.nix`

* Split out `simple-server` test into separate shell script

* Fix bash invocation

* Add intermediate `./default-tests.nix` build

* Add `tests.patch` to version control

* Split `python` command into separate script

* Provide `python` via `nix`
2016-08-05 09:29:20 -07:00
Gabriel Gonzalez
f9f59f2362 Fix gRPC-haskell Jenkins build (#64)
We now have Jenkins enabled for `gRPC-haskell` which verifies that
`nix-build release.nix` passes for each pull request.

`master` currently doesn't build, and this is the first pull request to fix the
build by adding the recently introduced `sorted-list` dependency to the `nix`
build.  This was done by running `cabal2nix . > default.nix` and also adding a
newer version of `sorted-list` to the `release.nix` file.  `nixos-16.03`
uses an older version of `sorted-list` which doesn't have an `IsList` instance for
`SortedList`.
2016-08-03 11:47:52 -07:00
Connor Clark
f3ecb06194 Update README.md 2016-08-02 14:37:56 -07:00
Connor Clark
f8bbe3abd2 Connor/metadata improvements (#52)
* make metadatamap a newtype of multimap

* update tests for new MetadataMap

* remove multimap dependency, reproduce needed functionality instead

* add repeated key to payload test

* bump LTS version for sorted-list, use SortedList for MetadataMap

* remove unneeded conversion

* MetadataMap documentation

* minor fixes
2016-08-01 12:38:35 -07:00
Gabriel Gonzalez
50ece70720 Add release.nix build instructions (#60)
The purpose of this is two-fold:

* To demonstrate an example of how to build the repository (which is non-trivial
  due to the `grpc` dependency)
* To eventually be used within CI (via `nix-build release.nix`)
2016-08-01 10:02:23 -07:00
Connor Clark
bd2c4092de use c99 (#62) 2016-07-29 14:54:03 -07:00
Connor Clark
bf4166e618 remove duplicated threadDelaySecs function (#56) 2016-07-29 13:18:08 -07:00
Phil Freeman
d1bc87daa6 Merge pull request #57 from awakenetworks/nix
Add cabal2nix derivation
2016-07-27 17:23:46 -07:00
Connor Clark
5a23c9ae90 make serverLoop blocking again (#59) 2016-07-27 16:50:48 -07:00
Phil Freeman
7be33c2792 Relax bounds 2016-07-27 15:41:50 -07:00
Phil Freeman
770dd735f3 Add cabal2nix derivation 2016-07-27 14:01:57 -07:00
Connor Clark
0d70a6c960 Criterion benchmarks (#50)
* begin bench executable

* tweak benchmark, fork serverLoop for interruptibility

* client streaming benchmarks

* add server streaming handler

* server streaming benchmark

* bidi streaming benchmark

* cleanup, create benchmark html

* improve error messages

* benchmarks: add bounds, remove -g, add -O2

* eliminate explicit sleep at shutdown

* bump protobuf-wire version

* remove superfluous parens, remove benchmarks.html
2016-07-26 15:48:25 -07:00
Joel Stanley
c1fa7956c7 "Hellos" C++/Haskell programs for exercising interop for streaming modes (#49)
* Hellos example: skeleton and server-streaming mode use

* Catch IO exceptions in dispatchLoop

* Distinguish decoding errors from other errors; convert error calls to explicit throws of GRPCIOErrors

* instance Exception GRPCIOError

* Add error checks and error messages to hellos cpp client

* Change fixed32 to uint32

* Add prelim hellos-client, hellos-server executables

* Hellos cpp example: add client-streaming mode use

* In unregistered high-level server, aggressively catch all exceptions raised in
handlers and promote then to a new GRPCIOError constructor.

* Hellos hs example: add client-streaming mode use

* Hellos cpp example: add simple bidi mode use

* Hellos hs example: add simple bidi mode use

* wibbles

* Add GRPCIOErrorEq newtype wrapper w/ Eq instance for testing purposes

* Refactoring wibbles

* README wibbles

* DCR

* Fix rebase derp

* Remove libdl dep, update protobuf github link in hellos cpp Makefile.

* Use Data.Coerce.coerce for GRPCIOErrorEq; remove warnings

* Report expected/got errors in Haskell hellos client/server

* Report expected/got errors in cpp hellos client/server

* Add some instructions for running the hellos client/server

* Fix warnings

* Rename logShow to logMsg and use stderr for logging

* Tweak compliation parameters for hellos hs executables; increase constant workload

* Remove unnecessary type annotation

* Simplify handleError in dispatchLoop

* Remove GRPCIOErrorEq and coerce use; change GRPCIOHandlerException type
2016-07-26 15:21:35 -07:00
Connor Clark
b3d0b8a4a7 high-level server: add initial metadata to options (#53) 2016-07-26 13:16:44 -07:00
Phil Freeman
334e78de27 Merge pull request #55 from awakenetworks/grpc-notes
Add GRPC build instructions to readme
2016-07-26 12:36:08 -07:00
Phil Freeman
1eda308a05 Add GRPC build instructions to readme 2016-07-26 12:05:56 -07:00
travis
89aa17b5e6 Added tests for grpc server generation 2016-07-26 11:22:42 -07:00
Travis Athougies
1d7526da70 Added tests for grpc server generation 2016-07-25 16:39:25 -07:00
Connor Clark
86bad965ce fix ifdef indentation (#51) 2016-07-22 14:29:05 -07:00
Connor Clark
ab4dea344d Server performance and stability improvements (#48)
* concurrent echo client for stress testing

* update examples for benchmarking, tweak cabal file

* mark frequently-used call as unsafe for performance boost

* add unsafe annotation to non-blocking C calls on critical path

* more unsafe annotations -- server performance almost doubled now

* one CQ for all call ops

* unsafe annotation on start_batch

* wait for all client threads, replace error with fail

* add -O2
2016-07-21 12:55:16 -07:00
Connor Clark
7409263957 update protobuf lib versions (#44) 2016-07-21 11:11:49 -07:00
Connor Clark
a34107b740 add new module to exposed-modules (#47) 2016-07-20 11:34:39 -07:00
Connor Clark
cc5d30acd2 Travis/service generation (#46)
* higher bound on clock versions

* Added helper module for generated service code
2016-07-20 11:26:53 -07:00
Connor Clark
65026eb79c Fix async race causing crash on server shutdown (#43)
* clean up forked threads before shutting down server

* get rid of sleep, wait until all forked threads are dead to shutdown server

* add todo
2016-07-18 11:04:01 -05:00