ScienceSoft logo

Stickerbook

Customer

The Customer is an American company Stickerbook Inc that creates social games.

Challenge

The Customer had an idea to make a fast and scalable Facebook app (Social game) with the help of which the users would be able to create, share and present their own virtual stickers and buy and collect those of other app users. According to the idea 3rd parties would also be able to sell their media (sticker or animated sticker) over the app. The app was supposed to meet the following requirements:

- App must have full Facebook graph integration;
- App must allow up to 1 million unique users per day;
- App must work fast in any case;
- 99.9% uptime;
- Backup of data and fast recovery on fail.

Solution

While Web server was stored on Amazon EC2 instance, the database was stored on another Amazon EC2 instance. This allowed ScienceSoft team to use Load Balancer to balance high load and cover performance requirements. Amazon Auto Scaling allowed to clone instances to approve and balance
performance between them. What is important is that when high load goes away, unnecessary instances are automatically removed. This allows users to pay only for used instance time, which makes the service rather cheap.

Facebook application front-end was made on Flash + HTML5 thanks to which rich UI and usability were created. Zend Framework was used for the back-end. Flash client communicates with the server using AMF and Sockets transport layer. Sockets allow us to achieve high performance on user actions because in this case you have nailed up connection with server, and response time on request takes no
more that 0.15 ms. Also, there can be more than one socket connection to achieve better usability. On the server side we developed high performance scalable multi threading Socket Server based on PHP5 language. Our socket server can also scale over the Amazon Cloud, and Balancing Rules can be
applied. To make balancing more flexible we used Varnish and Nginx. This allows to balance and direct users to less loaded instances of the app and, what is more important, to cache static and media content like images, video files, texts and etc. With the help of Amazon Simple DB è MongoDB used for
the application ScienceSoft team could scale the database and simultaneously process reads and writes without the loss of performance.

Memcached was also used for app caching layer. Integration with Facebook was made on PHP and Javascript. This allows us to make the app user-friendlier. With the help of the app users can share their content, make gifts to friends, buy stickers or books, achieve goals (make puzzles etc), take
part in different competitions and publish their results as feeds. Flash video player was developed to play video content on the Facebook user feed and wall. Users can invite friends and receive rewards for this or that action. Facebook credits and Social Gold merchants were used to process user payments and make monetization in the app.

Results

The first version of the application has been successfully launched. Its popularity is constantly growing in Facebook and is well monetized. Inspired by the success, the Customer continues the development of the app with ScienceSoft team.

Technologies and Tools

Linux, Nginx, Varnish, Apache Web Server, PHP5, Sockets, AMF, Amazon EC2, Amazon Auto Scaling, Amazon S3 for media storage, Voxel CDN, Zend Framework, Facebook Graph API, FBML, FBJS, FBQL, HTML 5, CSS, JavaScript and Jquery, Websockets.