Facebook architecture: software stack

In this presentation filmed during QCon SF 2008, Aditya Agarwal discusses Facebook’s architecture, more exactly the software stack used, presenting the advantages and disadvantages of its major components: LAMP (PHP, MySQL), Memcache, Thrift, Scribe.

Advertisements

Simple Thrift tutorial

I briefly explain here how to build a simple Thrift application in Java that returns the time on the server.

First, define the Thrift interface in file time.thrift:

# time.thrift
namespace java tserver.gen
typedef i64 Timestamp
service TimeServer {
   Timestamp time()
}

Generate the Java code:

thrift --gen java time.thrift

Import the generated code into your workspace. Now, we will implement the interface in the file TimeServerImpl.java:

Continue reading