How to make an app like Snapchat – Part 1

Snapchat began as a classroom project by its CTO Bobby Murphy as a minimalist smartphone app to share photos and short videos that destroyed themselves after a certain period of time.  In this first post of a 2 parter, I examine the technical elements of the app.  Nic will write a follow up post in 2 weeks, on the remarkable fundraising and commercial success the app has enjoyed. 

snapchat-app-icon

The app uses the smartphone’s camera to capture a photo, or a video with duration of no more than 10 seconds. Once the media is ready, the user can set a caption and select a duration for which the media will be available before it is destroyed. The app accesses a user’s address book to find other Snapchat users – matching by email address or phone number. These users are then available in the Snapchat app for sharing content. In a recent update, Snapchat introduced the concept of “Stories” which allows a user to share media that can be viewed for an unlimited number of times over a 24-hour period.

When a user sends someone a snap, it is uploaded to the Snapchat servers. The recipients of the snap are notified with a push notification of the arrival of a new snap, the app then downloads the snap and stores it in a temporary location in the phone. When the snap is viewed by the recipient and the timer runs out, the app deletes the temporary copy of the snap in the phone and informs the Snapchat server. After all the recipients of a snap finish viewing it, the snap is destroyed from Snapchat’s servers. If a snap is not viewed within 30 days, it is deleted automatically.

Snapchat grew as a free media sharing service very quickly. Within a year of its launch, Snapchat users were sending 20 million snaps per day – October 2012. The same month, their Android app was released. With the iOS and Android apps in the hands of happy snappers, Snapchat continued its growth with more than 50 million snaps sent every day as reported in December 2012. This number has now grown to 350 million snaps a day, as of October 2013.

It is challenging for any rapidly growing company to scale their server or backend infrastructure with such great user growth. So, how did Snapchat ensure their users continue to share snaps without any problems?

Snapchat uses Google App Engine to run their server infrastructure and Google Cloud Datastore to temporarily store their user’s snaps. Snapchat’s backend uses Google’s dedicated memcache to reduce datastore costs without affecting the quality of their service.

Having a cache to rapidly serve snaps to users helps in improving performance (delivering snaps to phones faster) as well as reducing storage requirements (most snaps are viewed as soon as they are received, snaps that are not viewed immediately are moved to the datastore). Google cloud platform offers businesses with auto-scaling, the option to automatically scale the backened based on the number of users who actively use an app.

If you’d like to learn more about utilizing cloud services when making an app, you should consider trying our Course on the Mobile App Business - we’ve a no risk Free Trial.

Indrajit Chakrabarty

Indrajit Chakrabarty wrote on

Indy is a co-founder of AppInstruct. He is an experienced systems architect and software engineer, with a Masters in Computational Physics. Indy recently wrote Microsoft's textbook in support of Windows 8 – “Essentials of Developing Windows Store Apps Using C#”. His favorite apps are the ones he creates in his spare time to support the Internet of Things!