Skip to content

Native Haskell gRPC client and server based on `http2`

Notifications You must be signed in to change notification settings

well-typed/grapesy

Repository files navigation

grapesy: industrial strength gRPC library for Haskell

Haskell library providing gRPC client and server.

Interoperability matrix

The gRPC framework comes with a test suite that tests interoperability between implementations as well compliance to the gRPC specification. As the table below shows, grapesy passes all of these tests, apart from the Open Request Cost Aggregation (ORCA) tests, which is not yet supported by grapesy.

Legend and version information

Legend:

  • βœ… passed
  • ❌ failed
  • ❔ not supported by the reference (or reference does not conform to the gRPC specification)
  • 🚫 not supported by grapesy

We last tested against version v1.69.0 (released Dec 24, 2024).

grapesy server versus reference client

Test Python C++ Go Java grapesy
cancel_after_begin βœ… βœ… βœ… βœ… βœ…
cancel_after_first_response βœ… βœ… βœ… βœ… βœ…
client_compressed_streaming ❔ βœ… ❔ βœ… βœ…
client_compressed_unary ❔ βœ… ❔ βœ… βœ…
client_streaming βœ… βœ… βœ… βœ… βœ…
custom_metadata βœ… βœ… βœ… βœ… βœ…
empty_stream βœ… βœ… βœ… βœ… βœ…
empty_unary βœ… βœ… βœ… βœ… βœ…
large_unary βœ… βœ… βœ… βœ… βœ…
orca_oob 🚫 🚫 🚫 🚫 🚫
orca_per_rpc 🚫 🚫 🚫 🚫 🚫
ping_pong βœ… βœ… βœ… βœ… βœ…
server_compressed_streaming ❔ βœ… ❔ βœ… βœ…
server_compressed_unary ❔ βœ… ❔ βœ… βœ…
server_streaming βœ… βœ… βœ… βœ… βœ…
special_status_message βœ… ❔ βœ… βœ… βœ…
status_code_and_message βœ… βœ… βœ… βœ… βœ…
timeout_on_sleeping_server βœ… βœ… βœ… βœ… βœ…
unimplemented_method βœ… βœ… βœ… βœ… βœ…
unimplemented_service βœ… βœ… βœ… βœ… βœ…

grapesy client versus reference server

Test Python C++ Go Java grapesy
cancel_after_begin βœ… βœ… βœ… βœ… βœ…
cancel_after_first_response βœ… βœ… βœ… βœ… βœ…
client_compressed_streaming ❔ βœ… ❔ ❔ βœ…
client_compressed_unary ❔ βœ… ❔ ❔ βœ…
client_streaming βœ… βœ… βœ… βœ… βœ…
custom_metadata βœ… βœ… βœ… βœ… βœ…
empty_stream βœ… βœ… βœ… βœ… βœ…
empty_unary βœ… βœ… βœ… βœ… βœ…
large_unary βœ… βœ… βœ… βœ… βœ…
orca_oob 🚫 🚫 🚫 🚫 🚫
orca_per_rpc 🚫 🚫 🚫 🚫 🚫
ping_pong βœ… βœ… βœ… βœ… βœ…
server_compressed_streaming ❔ βœ… ❔ ❔ βœ…
server_compressed_unary ❔ βœ… ❔ βœ… βœ…
server_streaming βœ… βœ… βœ… βœ… βœ…
special_status_message βœ… βœ… βœ… βœ… βœ…
status_code_and_message βœ… βœ… βœ… βœ… βœ…
timeout_on_sleeping_server βœ… βœ… βœ… ❔ βœ…
unimplemented_method βœ… βœ… βœ… βœ… βœ…
unimplemented_service βœ… βœ… βœ… βœ… βœ…

Unsupported tests

There are additional tests that are not supported by grapesy, but since these are not supported by any of the reference implementations that we tested, we did not consider them any further. The full list is:

Memory profiles

Screenshots of the "Area Chart" display of the eventlog2html output for selected RPC communication patterns.

Many connections

Client opens many connections and does a single non-streaming RPC.

Client profile:

Client many connections profile

Server profile:

Server many connections profile

Many calls

Client opens a single connection and does many RPCs.

Client profile:

Client many connections profile

Server profile:

Server many connections profile

Many messages

Client opens a single connection and does a single RPC that sends many messages.

Client profile:

Client many connections profile

Server profile:

Server many connections profile

Benchmarks

Run type Linux (RPCs/s) OSX (RPCs/s)
Grapesy Java Grapesy Java
sequential protobuf 4654.500 7169.283 2919.783 1907.350
concurrent protobuf 3326.283 10908.650 5032.950 4571.750
sequential json 2371.233 2427.900 909.417 1574.817
concurrent json 3019.733 6143.567 1151.017 3563.867

About

Native Haskell gRPC client and server based on `http2`

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages