In the recent years, with the rise of the Web, data centric architectures and information technologies have become important subjects in architecture design. New products are motivated by the data users are interested in, while designers are mainly focused on building the “logic” and “display” tiers of the application. A successful example of such an application is Facebook, which manipulates and displays social data as biographical information, relationship mappings, user media, etc.
However, what makes Facebook an interesting architecture is the fact that the importance of data is recognized beyond the boundaries of the platform. With this mind, Facebook architects created a concept that improved upon the isolation of a typical n-tier stack by integrating external systems in the form of applications. External apps integration is supported by a suite of web service (Facebook API), a query language (FQL), a data-driver markup language (FBML) and some other custom artifacts.
There are mainly two integration scenarios that are worth mentioning. The first one is adding Facebook’s powerful social context to external applications, thus eliminating the need for these otherwise separate applications to implement their own social network. With this scenario, web apps, desktop OS apps and other alternative device apps can add social context by connecting to a Facebook externally available web service, which implements the Platform API. A beautiful feature of the web service design is the use of metadata (specified in Thrift – an open source cross-language) to encapsulate the types and signatures describing the API. Among the main benefits of using metadata are automatic binding, automatic documentation and cross-language synchronization, the service being able to be consumed externally by XML and JSON clients and internally by PHP, Java, C++, etc. Regarding user security and privacy, some of the original concerns of the Facebook architecture, they are also preserved in this scenario by implementing a simple authentication scheme where the client of the web service sends a “session_key” along with every request.
The second scenario is integrating external applications into Facebook, the social site itself. This way applications benefit from the full power of the social platform by getting more exposure, thus increasing their critical mass of users. When integrating apps into Facebook, the apps themselves are framed as web services providing FBML content to Facebook for display. FBML is a data-driven markup language designed by Facebook that allows developers to provide logic and display from the application stack and additionally add requests for platform protected data. As a web service client, Facebook then renders FBML entirely in its trusted server environment.
The platform architecture is in fact more complex. Besides FBML and Thrift, Facebook is providing more custom artifacts designed to ease the integration of external apps. FBJS, platform’s java script emulation suite, the design of the platform cookies and FQL, a simple query language wrapper around Facebook’s internal data are only a few examples reflecting the reach capabilities of Facebook.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment