Because you host your own application, it’s a good idea to go over how Facebook applications actually work. Essentially, Facebook provides your application to users when it is requested through Facebook.
As you can see in the Figure, each time a Facebook user interacts with your application, you set off a series of server interactions with the Facebook server farm and your server. Each time a user requests something from your application through Facebook, that request is passed to your server to create the initial REST call to the Facebook API. Once your server has received the response (in the format you have requested), you server then passes the response to construct a display call (in FBML) and passes that back to the Facebook server. Facebook processes this information and creates an HTML response to the user. Because of the constant passing of information between servers, there is an additional level of complexity that can complicate tracking down bugs. You also need to consider this constant interaction when developing your application because you don’t want to make unnecessary API calls that will slow down your application.
Below figure shows the Basic Facebook architecture:

0 comments