tchannel-go

Go implementation of a multiplexing and framing protocol for RPC calls

  • 所有者: uber/tchannel-go
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

TChannel GoDoc Build Status Coverage Status

TChannel is a multiplexing and framing protocol for RPC calls.
tchannel-go is a Go implementation of the protocol, including client libraries
for Hyperbahn.

If you'd like to start by writing a small Thrift and TChannel service, check
out this guide. For a less opinionated setup, see
the contribution guidelines.

Overview

TChannel is a network protocol that supports:

  • A request/response model,
  • Multiplexing multiple requests across the same TCP socket,
  • Out-of-order responses,
  • Streaming requests and responses,
  • Checksummed frames,
  • Transport of arbitrary payloads,
  • Easy implementation in many languages, and
  • Redis-like performance.

This protocol is intended to run on datacenter networks for inter-process
communication.

Protocol

TChannel frames have a fixed-length header and 3 variable-length fields. The
underlying protocol does not assign meaning to these fields, but the included
client/server implementation uses the first field to represent a unique
endpoint or function name in an RPC model. The next two fields can be used for
arbitrary data. Some suggested way to use the 3 fields are:

  • URI path + HTTP method and headers as JSON + body, or
  • Function name + headers + thrift/protobuf.

Note, however, that the only encoding supported by TChannel is UTF-8. If you
want JSON, you'll need to stringify and parse outside of TChannel.

This design supports efficient routing and forwarding: routers need to parse
the first or second field, but can forward the third field without parsing.

There is no notion of client and server in this system. Every TChannel instance
is capable of making and receiving requests, and thus requires a unique port on
which to listen. This requirement may change in the future.

See the protocol specification for more details.

Examples

  • ping: A simple ping/pong example using raw TChannel.
  • thrift: A Thrift server/client example.
  • keyvalue: A keyvalue Thrift service with separate server and client binaries.

主要指標

概覽
名稱與所有者uber/tchannel-go
主編程語言Go
編程語言Makefile (語言數: 5)
平台
許可證MIT License
所有者活动
創建於2015-09-18 18:28:15
推送於2025-01-08 17:37:32
最后一次提交2025-01-08 09:09:23
發布數56
最新版本名稱v1.34.6 (發布於 2025-01-08 09:35:32)
第一版名稱v0.01 (發布於 )
用户参与
星數507
關注者數2.5k
派生數86
提交數2.1k
已啟用問題?
問題數156
打開的問題數43
拉請求數676
打開的拉請求數11
關閉的拉請求數83
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?