Social networking is art of connecting with those who share common
interests. This is based on my research in various web sites.
Face book Use Case:
1. Social Graph
2. Friend connections
3. Friends Friend connections
4. Friend can comments, read your stuff, like
5. You can update you status, upload pictures, videos
6. You can post your details
7. Your each post is tracked on time line
Volumes of data
1. Tera/Peta bytes of data is stored. 350+ million users are
High level architecture
1. Front end : Servers run on LAMP ( Linux, Apache, MySQL , and PHP)
a. FB runs on the Linux and Apache web servers.
b. MySQL : Key values stored data. Data is randomly distributed across the large server
c. PHP : Web programming language
: Memcache is a memory caching system that is used to speed up dynamic
database-driven websites (like Facebook) by caching data and objects in
RAM to reduce reading time.
1. Create service nedded
2. Create a framework/tool set for easier creation of services
3. Use the right programming language for the task
|mika-shroepfera’s architecture diagram
- PHP web server collect data, multiple dedicated web services. There are other services developed by Python, C++, Erlang and so on. In order to communicate between all these services “Thrift” is used.
- Load Balancer to Balance the incoming web page access.
The below diagram shows facebook block diagram
|Aditi technology’s slide pack
Open Source Model
BigPipe is a fundamental redesign of the dynamic web page serving system. The general idea is to decompose web pages into small chunks called page lets and pipeline them through several execution stages inside web servers and browsers see as below
Thrift is a lightweight remote procedure call framework for
scalable cross-language services development. Thrift supports C++,
PHP, Python, Perl, Java, Ruby, Erlang, and others. It’s quick, saves
time, and provides a division of labor of work on
high-performance servers and applications.
Scribe is a server for aggregating log data streamed in
real-time from many other servers. It is a scalable framework useful for
logging a wide array of data. It is built on top of Thrift.
Cassandra was earlier used , now this is being replaced by HBase
Apache Cassandra is an open source distributed database management system. It is an Apache Software Foundation top-level project designed to handle very large amounts of data spread out across many commodity servers while providing a highly available service with no single point of failure.
HipHop for PHP is a source code transformer for PHP script code. HipHop programmatically transforms PHP source code into C++ and then uses g++ to compile it to machine code. HipHop includes a code transformer, a reimplementation of PHP’s runtime system, and a rewrite of many common PHP Extensions to take advantage of these performance optimizations
Apache HBase™ is the Hadoop database, a distributed, scalable, big data store.
Haystack for the pictures
The high level Facebook architectural in terms of LAMP other protocols is explained in following Video (OSCON 2010: David Recordon, “Today’s LAMP Stack”)
Many thanks for many views and support. Please comment.
1. Hay Stack
: Pictures usage and architecture