It was not obvious from the type how many times the
final field of ClientReaderRequest would be invoked.
(Assuming it is invoked once per stream increment
results in a hang, which can be confusing.)
* Expose the max receive message length channel argument + unittest
* `ClientError` GADT ctor => `ClientErrorResponse`, expose `ClientError`
Prior to this commit, the name `ClientError` was both:
- The name of a data constructor name for the `ClientResult` GADT
- A name of an internal sum type for capturing different kinds of client
errors
We want to expose the latter to users of the library, and so expose the latter
and rename the former.
* Remove unused `MultiWayIf` lang ext
Instead of making a blocking foreign call without a timeout, we set a
timeout of one second. This way, the thread returns in Haskell code (and
thus is interruptible) at least every second. This is useful in order to
be able to kill `Server`s, see
https://github.com/awakesecurity/gRPC-haskell/issues/22.
* Make withServer provide the actual port
Again, useful to make a server listen on any available port by giving it
port zero (for testing).
* Re-introduce check on server port
* Add port field to Server
* Style: Remove unneeded newline
* Revert changes in tests
* add basic tutorial, re-export client stuff in HighLevel.Generated
* add a relative link in README.md
* forgot to document the language extensions
* cabal file fixup
* more context to compile-proto-file
* haskell syntax highlighting in markdown
* link to gRPC official tutorials for basic concepts
* add a note on how to build the examples
* prominent notice of required gRPC version
* fix typo
* do some error handling, show how to run the example executables
* use mapM
* update for reorganized headers in gRPC v1.1: https://github.com/grpc/grpc/pull/7559
* update nix files
* rename all gpr_slice to grpc_slice since we can't be backwards compatible anyway
* use gRPC 1.1.4
* now compatible with gRPC 1.2.0
* use nixpkgs 17.03 to get protobuf3_2, newer proto3-* deps, fix some warnings
* another warning
* Update `proto3-suite` gitrev in `stack.yaml` to `8db2ceb8c48a3f8dc2cbdc492d1e8cbaf8b62a15`
* Update `proto3-suite` gitrev in `nix/proto3-suite.nix` to `8db2ceb8c48a3f8dc2cbdc492d1e8cbaf8b62a15`
* Regenerate `Echo.hs` via new `proto3-suite` + `compile-proto-file`
* Remove additional warnings
* echo client/server example: dead code removal, add command line params, improve output messages
* Add nix-build result to .gitignore
* Merge echo-client and echo-server directories to echo-hs/ directory; rename main modules accordingly
* Use our protobuf compiler to generate bindings for the Echo service
* Simplify echo.proto to just one endpoint; use highlevel client/server interfaces and codegen for echo example
* Remove repetition counts and thread spawns from echo client, parameterize payload
* Update default.nix
* 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
* 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
* 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
* (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
* 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`
* 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
* 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
* remove parent ptr from unregistered calls -- unneeded
* begin unregistered high level server loop
* undo changes to highlevel server, add mkConfig for unregistered server
* move call CQ create/destroy into call create/destroy
* async normal call function
* preliminary unregistered server loop for non-streaming methods
* working unregistered highlevel example
* loop counters for benchmarking
* changes for benchmarking, add ruby example server for benchmarking
* async version of withCall, refactor unregistered server loop to handle all method types
* unregistered client streaming
* add remaining streaming modes
* unregistered server streaming test
* unregistered streaming tests
* add error logging
* fix bug in add example
* remove old TODOs
* fix bug: don't assume slices are null-terminated
* add TODO re: unregistered client streaming functions
* Tweak runOps param order, inline common op sequences, clean up serverHandleNormalCall
* More ops sequence inlining for clarity, experimenting with Managed
* Checkpoint: preliminary support for all streaming modes; much cleanup/refactoring and api design still needed
* Use mempty for default StatusDetails; tweak bad status matching mechanism
* Preliminary user-facing, server-streaming, low-level api and test
* renaming wibbles
* Preliminary user-facing, client-streaming, low-level api and test
* Move sendMsgs comb to Network.GRPC.LowLevel.Op; misc cleanup/DCR
* Modify bidi streaming to omit request payload
* Add transformers dep
* Preliminary user-facing low-level bidirectional streaming api and test
* Fix missing peek import
* Remove TimeoutSeconds params on streaming mode functions
* Fix serverHandleNormalCall rebase wart
* Fix rebase warts; minor hlint fixes and wibbles
* Post-rebase tweaks to optional payload use in serverRequestCall (i.e., now respects payloadHandling again)
* Cleanup/refactor serverRequestCall
* Fix comment
* Change ServerRWHandler type so that handler does not have to invoke a finalizer
* Change ServerReaderHandler type so that handler does not have to invoke a finalizer
* Simplify serverWriter interface and ServerWriterHandler structure
* Simplify serverRW (get rid of exec param), improve bidi streaming tests
* Use ExceptT in serverRW impl
* Change ServerRWHandler type to pass recv/send operations.
* Renaming
* Define ClientRWHandler, pass recv/send ops
* wibbles
* Use ExceptT in clientRW impl
* Add DataKinded phantom typing to RegisteredMethod; misc cleanup
* Simplify sendMsgs interface; add SingleSend type and related helpers
* Rename SingleSend to SendSingle, use ExceptT to clean up {client,server}Writer and sendMsgs
* More ExceptT cleanup in clientWriter
* Factor out reusable bits of clientWriter
* Shrink ServerReaderHandler
* Delete stale comments
* begin high-level server interface
* update to datakind representation
* clean up
* move method type info to type level, parametrize ServerCall by payload
* convert for writer handler
* start switching over to Message-based handlers
* begin work on highlevel example
* comment out old code
* parametrize StreamSend
* parametrize StreamRecv
* conversion for ServerReaderHandler
* finish handler conversions
* Add high level version and payload checking to echo-client
* Decouple server CQs from call-bound CQs (registered methods); use more consistent naming conventions
* Decouple server/call-bound CQs for unregistered methods; refactor U.serverRequestCall; misc cleanup
* Make convertRecv total; formatting wibbles
pluckers) would register a CQ notification via
grpc_server_request_registered_call prior to obtaining pluck permission, block
on acquiring such permission, and thus miss notification of the server call.
The bug can could be witnessed with particular interleavings by ensuring that
GRPC_MAX_COMPLETION_QUEUE_PLUCKERS server threads are blocked on their own
server call notifications, and then using the
(GRPC_MAX_COMPLETION_QUEUE_PLUCKERS+1)th server thread to attempt to block on a
notification for an additional server call.
In order to fix this, we simply extended the pluck permission held window for
serverRequestCall, and created a variant of pluck (called pluck') which assumes
permission to pluck is already held by the calling thread.
* Tweak runOps param order, inline common op sequences, clean up serverHandleNormalCall
* More ops sequence inlining for clarity, experimenting with Managed
* Checkpoint: preliminary support for all streaming modes; much cleanup/refactoring and api design still needed
* Use mempty for default StatusDetails; tweak bad status matching mechanism
* Preliminary user-facing, server-streaming, low-level api and test
* renaming wibbles
* Preliminary user-facing, client-streaming, low-level api and test
* Move sendMsgs comb to Network.GRPC.LowLevel.Op; misc cleanup/DCR
* Modify bidi streaming to omit request payload
* Add transformers dep
* Preliminary user-facing low-level bidirectional streaming api and test
* Fix missing peek import
* Remove TimeoutSeconds params on streaming mode functions
* Fix serverHandleNormalCall rebase wart
* Fix rebase warts; minor hlint fixes and wibbles
* Post-rebase tweaks to optional payload use in serverRequestCall (i.e., now respects payloadHandling again)
* Cleanup/refactor serverRequestCall
* Fix comment
* Change ServerRWHandler type so that handler does not have to invoke a finalizer
* Change ServerReaderHandler type so that handler does not have to invoke a finalizer
* Simplify serverWriter interface and ServerWriterHandler structure
* Simplify serverRW (get rid of exec param), improve bidi streaming tests
* Use ExceptT in serverRW impl
* Change ServerRWHandler type to pass recv/send operations.
* Renaming
* Define ClientRWHandler, pass recv/send ops
* wibbles
* Use ExceptT in clientRW impl
* Add DataKinded phantom typing to RegisteredMethod; misc cleanup
* Simplify sendMsgs interface; add SingleSend type and related helpers
* Rename SingleSend to SendSingle, use ExceptT to clean up {client,server}Writer and sendMsgs
* More ExceptT cleanup in clientWriter
* Factor out reusable bits of clientWriter
* Shrink ServerReaderHandler
* Delete stale comments
* Use common machinery for all streaming modes; make handler types more consistent
* wibbles