unclechu's fork of gRPC-haskell
Go to file
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
cbits High-level unregistered concurrent interface (#41) 2016-07-14 09:53:28 -07:00
examples "Hellos" C++/Haskell programs for exercising interop for streaming modes (#49) 2016-07-26 15:21:35 -07:00
include High-level unregistered concurrent interface (#41) 2016-07-14 09:53:28 -07:00
src/Network/GRPC "Hellos" C++/Haskell programs for exercising interop for streaming modes (#49) 2016-07-26 15:21:35 -07:00
tests "Hellos" C++/Haskell programs for exercising interop for streaming modes (#49) 2016-07-26 15:21:35 -07:00
.gitignore ignore compiled cpp binaries (#31) 2016-06-22 10:41:38 -07:00
benchmarks.html fix ifdef indentation (#51) 2016-07-22 14:29:05 -07:00
grpc-haskell.cabal "Hellos" C++/Haskell programs for exercising interop for streaming modes (#49) 2016-07-26 15:21:35 -07:00
LICENSE Initial commit. 2015-02-27 18:14:32 +01:00
README.md Add GRPC build instructions to readme 2016-07-26 12:05:56 -07:00
Setup.hs Initial commit. 2015-02-27 18:14:32 +01:00
stack.yaml Added tests for grpc server generation 2016-07-25 16:39:25 -07:00

Running the tests

In order to run the tests, you will need to have the grpcio, gevent, and grpcio-tools python packages installed. You can install them using pip. It is recommended that you use a python virtualenv to do this.

$ virtualenv path/to/virtualenv # to create a virtualenv
$ . path/to/virtual/env/bin/activate # to use an existing virtualenv
$ pip install grpcio-tools gevent
$ pip install grpcio # Need to install grpcio-tools first to avoid a versioning problem

Building GRPC

In order to compile this project, and anything which depends on it, you will need a working installation of the GRPC C core libraries. This library currently uses the 0.14 version range, so checkout an appropriate revision of the repository, and install as follows:

git clone https://github.com/grpc/grpc.git
git checkout 2b223977c13975648bac2f422363e1ebf83506ce
cd grpc
git submodule update --init
make
sudo make install

Alternatively, using Nix, pass the following expression to nix-build and point Stack to the build products in the Nix store:

let pkgs = import <nixpkgs> {};
in  pkgs.stdenv.mkDerivation rec
    {   name = "grpc";
        src = pkgs.fetchgit
        { url    = "https://github.com/grpc/grpc.git";
          rev    = "2b223977c13975648bac2f422363e1ebf83506ce";
          sha256 = "0arxjdczgj6rbg14f6x24863mrz0xgpakmdfg54zp0xp7h2pghm6";
        };
        preInstall = "export prefix";
        buildInputs =
        [   pkgs.darwin.cctools
            pkgs.autoconf
            pkgs.automake
            pkgs.libtool
            pkgs.which
            pkgs.zlib

            pkgs.openssl
        ];
    }