Skip to content

Latest commit

 

History

History
59 lines (38 loc) · 2.82 KB

rpc-spec.asciidoc

File metadata and controls

59 lines (38 loc) · 2.82 KB

Thrift specification - Remote Procedure Call

The missing specification.

No maintenance intended

This document has been adopted by the Thrift project at https://github.com/apache/thrift/tree/master/doc/specs and is maintained there by the Thrift community. This copy will not receive any further updates.

Introduction

Thrift is a RPC mechanism that easily blends in with your code. It has a wonderful transport protocol that stays backward and forward compatible without the security pitfalls brought by seriapalooza.

This document specifies the so far undocumented thrift RPC message exchange and the wire encoding of those messages in the binary protocol and the more modern compact protocol. Then the binary protocol and compact protocol are compared. Finally it describes the framed vs. unframed transport.

For background on Thrift see the Thrift white paper (pdf).

This document is for Thrift implementers. Thrift users should read the thrift documentation and the missing thrift guide.

The information here is based on research in the Java implementation in the Apache thrift library (version 0.9.1 and 0.9.3) and THRIFT-110 A more compact format. Other implementation however, should behave the same.

Copyright © 2016 Erik van Oosten

Feedback and contributions to this specifications are very welcome. You can find the source code on GitHub.

There is also a PDF version of this document.

BNF notation used in this document

The following BNF notation is used:

  • a plus + appended to an item represents repetition; the item is repeated 1 or more times

  • a star * appended to an item represents optional repetition; the item is repeated 0 or more times

  • a pipe | between items represents choice, the first matching item is selected

  • parenthesis ( and ) are used for grouping multiple items