https://github.com/platformlab/grpc_homa
Allows Homa to be used as a transport with gRPC.
https://github.com/platformlab/grpc_homa
Last synced: 9 months ago
JSON representation
Allows Homa to be used as a transport with gRPC.
- Host: GitHub
- URL: https://github.com/platformlab/grpc_homa
- Owner: PlatformLab
- Created: 2020-11-13T00:07:16.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-10-18T21:04:19.000Z (over 2 years ago)
- Last Synced: 2023-10-18T22:24:51.669Z (over 2 years ago)
- Language: C++
- Size: 327 KB
- Stars: 21
- Watchers: 4
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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.
- The head is currently based on gRPC v. 1.57.0 (and there is a branch
named grpc-1.57.0 that will track this version of gRPC). There are
also branches grpc-1.43.0 and grpc-1.41.0, which represent the
most recent code to work on those branches. Older branches are not
actively maintained.
- 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).
### How to use grpc_homa
- You will need to download the
[Linux kernel driver for Homa](https://github.com/PlatformLab/HomaModule).
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 build `libhoma.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, pass `HomaClient::insecureChannelCredentials()` to
`grpc::CreateChannel` instead of `grpc::InsecureChannelCredentials()`
to create a channel that uses Homa.
For an example of a simple but complete client, see `test_client.cc`.
- On servers, pass `HomaListener::insecureCredentials()` to
`grpc::AddListeningPort` instead of `grpc::InsecureServerCredentials()`.
For an example of a simple but complete server, see `test_server.cc`.
- Once you have done this, all your existing gRPC-based code should
work just fine.