• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

cmd/protoc-gen-gogottrpc/H28-Oct-2019-4424

example/H28-Oct-2019-948827

plugin/H28-Oct-2019-148114

.gitignoreH A D28-Oct-2019275 1511

.travis.ymlH A D28-Oct-2019560 2418

LICENSEH A D28-Oct-201911.1 KiB202169

README.mdH A D28-Oct-20192.5 KiB6345

channel.goH A D28-Oct-20194 KiB154101

channel_test.goH A D28-Oct-20192.4 KiB12692

client.goH A D28-Oct-20197.3 KiB354274

codec.goH A D28-Oct-20191.1 KiB4322

config.goH A D28-Oct-20191.5 KiB5325

go.modH A D28-Oct-2019368 1411

go.sumH A D28-Oct-20195.7 KiB6160

handshake.goH A D28-Oct-20191.7 KiB5115

interceptor.goH A D28-Oct-20191.8 KiB5118

metadata.goH A D28-Oct-20192.6 KiB10867

metadata_test.goH A D28-Oct-20192.7 KiB10977

server.goH A D28-Oct-20199.9 KiB486385

server_test.goH A D28-Oct-201915.1 KiB614482

services.goH A D28-Oct-20194 KiB166121

services_test.goH A D28-Oct-2019889 3011

types.goH A D28-Oct-20192.1 KiB6436

unixcreds_linux.goH A D28-Oct-20193.4 KiB10964

README.md

1# ttrpc
2
3[![Build Status](https://travis-ci.org/containerd/ttrpc.svg?branch=master)](https://travis-ci.org/containerd/ttrpc)
4
5GRPC for low-memory environments.
6
7The existing grpc-go project requires a lot of memory overhead for importing
8packages and at runtime. While this is great for many services with low density
9requirements, this can be a problem when running a large number of services on
10a single machine or on a machine with a small amount of memory.
11
12Using the same GRPC definitions, this project reduces the binary size and
13protocol overhead required. We do this by eliding the `net/http`, `net/http2`
14and `grpc` package used by grpc replacing it with a lightweight framing
15protocol. The result are smaller binaries that use less resident memory with
16the same ease of use as GRPC.
17
18Please note that while this project supports generating either end of the
19protocol, the generated service definitions will be incompatible with regular
20GRPC services, as they do not speak the same protocol.
21
22# Usage
23
24Create a gogo vanity binary (see
25[`cmd/protoc-gen-gogottrpc/main.go`](cmd/protoc-gen-gogottrpc/main.go) for an
26example with the ttrpc plugin enabled.
27
28It's recommended to use [`protobuild`](https://github.com//stevvooe/protobuild)
29to build the protobufs for this project, but this will work with protoc
30directly, if required.
31
32# Differences from GRPC
33
34- The protocol stack has been replaced with a lighter protocol that doesn't
35  require http, http2 and tls.
36- The client and server interface are identical whereas in GRPC there is a
37  client and server interface that are different.
38- The Go stdlib context package is used instead.
39- No support for streams yet.
40
41# Status
42
43Very new. YMMV.
44
45TODO:
46
47- [X] Plumb error codes and GRPC status
48- [X] Remove use of any type and dependency on typeurl package
49- [X] Ensure that protocol can support streaming in the future
50- [ ] Document protocol layout
51- [ ] Add testing under concurrent load to ensure
52- [ ] Verify connection error handling
53
54# Project details
55
56ttrpc is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE).
57As a containerd sub-project, you will find the:
58 * [Project governance](https://github.com/containerd/project/blob/master/GOVERNANCE.md),
59 * [Maintainers](https://github.com/containerd/project/blob/master/MAINTAINERS),
60 * and [Contributing guidelines](https://github.com/containerd/project/blob/master/CONTRIBUTING.md)
61
62information in our [`containerd/project`](https://github.com/containerd/project) repository.
63