Text Me Engineering Blog

RSS

Posts tagged with "backend"

Feb 2

The TextMe Stack - part 1 - the legacy

This is the first post of our engineering blog, and we hope to have interesting things to share with you in the coming weeks.

The first thing we’d like to share is the stack TextMe infrastructure is built on.

But first things first, let’s have a look at how the system powering TextMe started.
At first (at the beginning of 2009), TextMe was nothing more than an iOS to iOS instant messenger and the TextMe infrastructure was nothing more than a single machine. Yep, that’s right, everything was on the same box (as insane it may sounds). Back then, TextMe was more a proof of concept than anything else, and we were still wondering if the app will took off and get some traction.

Our stack was kind of über classic: LAMP - Linux, Apache 2, Mysql 5 and PHP 5.
The TextMe iOS client communicated with the backend server (running Ubuntu) over HTTP, the webapp written in PHP was served by a bunch of Apache processes, messages and accounts were stored in a MySQL database, pictures attached to messages were stored on disk, and MemcacheQ was used to spool iOS notifications. Messages in the queue were consumed by a simple Python process connecting to the Apple Push Notification Service.
And that was pretty much about it.



This single box used for the launch of TextMe on the AppStore, was an underpowered “kimsufi” dedicated server hosted by OVH. (An Intel Celeron processor with 1GB of RAM, if we remember correctly). No impressive specs here, but enough to get things started.

Six month later we decided to migrate the service to a bigger box and decided that we need to be hosted elsewhere, since QoS was starting to be a real issue with OVH.

This new box, hosted by Hetzner - a German hosting company, was an Intel i7-920 Quadcore with 8GB of RAM and 2x750 GB of disk (Soft-RAID1)
This backend was able to handle the growing number of users, and gave us plenty of power to test new things (such as group messaging).

When we started, the main idea driving the development of TextMe was “easiness” (eg: The first version sported no account management at all. You were asked to choose a username, and boom, you were in. It turned out, it was a mistake, since account management was really something user was eager to have in such app, but that’s another story). We tried to replicate this state of mind on the backend and kept everything very simple.

This post was the first installment of a series of articles about the infrastructure behind TextMe. Next article will cover the migration of the original backend to a cloud-based infrastructure.