This project adds Homa support to gRPC, so that gRPC applications can use Homa instead of TCP for transport.
-
This project is still in a relatively early stage of development, but C++ support is functional as of November 2021. Next up is Java support.
-
Please contact me if you have any problems; I'm happy to provide advice and support.
-
Known limitations:
- grpc_homa currently supports only insecure channels.
-
Initial performance measurements show that short RPCs complete about 40% faster with Homa than with TCP (about 55 us round trip for Homa, vs. 90 us for TCP).
-
You will need to download the Linux kernel driver for Homa. Compile it as described in that repo and install it on all the machines where you plan to use gRPC.
-
Configure the Makefile as described in the comments at the top (sorry... I know this shouldn't need to be done manually).
-
Type
make
. This will buildlibhoma.a
, which you should link with your applications. -
When compiling your applications, use
-I
to specify this directory, then#include homa_client.h
as needed for clients and#include homa_listener.h
as needed for servers. -
On clients, invoke
HomaClient::createInsecureChannel
to create channels instead ofgrpc::CreateChannel
. It takes a single argument, which is a string of the form host:port identifying the Homa server. For an example of a simple but complete client, seetest_client.cc
-
On servers, pass
HomaListener::insecureCredentials()
toAddListeningPort
instead ofgrpc::InsecureServerCredentials()
. For an example of a simple but complete server, seetest_server.cc
. -
Once you have done this, all your existing gRPC-based code should work just fine.