Thrift

(Sick) Service Oriented Architecture

Apache RPC Used by

  • Facebook
  • Evernote
  • Quora
  • Twitter
  • Pinterest

What is the upside

compared to REST or Messaging?

Portable

Write a server in one language and automatically generate clients in ALL (almost) languages.

 

No need to write and maintain clients in multiple languages

 

Plogger-client (Node)

Plogger-client (Go)

Plogger-client (Python)

What is the upside

compared to REST or Messaging?

Fast

Transports and protocols have tradeoffs (Raw TCP with binary protocol is fast but tough to manage)

 

Thrift abstracts transports and protocols, so we can have fun programming.

 

Serializing and deserializing objects takes time.  Thrift type system in CPP presumably helps

Safe

You define the interface for your service in a C-like file.

 

Strict types ensure that you always pass expected data between clients and servers.

 

Less need for client or server side validation of input through forms or what not.

Let's look at code

Made with Slides.com