We occasionally get emails from developers asking for details on the tech stack behind Imsy. With this blog post, we hope to give a sneak peek of things under the hood and get some more able minds to join us!
At the user device end, Imsy works on Android (Java), iOS (Objective C) and Symbian (C++). We will shortly be adding Windows (Silverlight) and MIDP (Java), with Blackberry (Java again) coming later.
On the backend, the most critical component is the Messaging Gateway, that is responsible for routing and delivery of millions of P2P, Group and apps messages each day. The core of the engine is written in Node.js, which has been hailed as the new Ruby or PHP. At its heart, Node is an evented, non-blocking I/O model - a software architecture that's built not around Threads or data but events. So there is no waiting for one thing to happen before moving on to the next, with the effect that thousands of concurrent connections can be supported all at once. This backend is hosted on load balanced, on-demand instances on Amazon EC2.
On Android and iOS, we use the Push Notification infrastructure provided by Google and Apple. But on Symbian (and soon on MIDP), we use WebSocket. Part of the appeal of a messaging app like Imsy over the traditional SMS is the reliable delivery indicators and speed, where you can even see when your friend is typing! The blazing speed of Node.js and WebSockets let us provide that.
We use MySQL as the database, hosted on Multi-AZ DB instances on Amazon RDS. Since on Imsy, users' messages are stored only temporarily on our system, only till they are delivered, the overall DB size is not much - but the DB performance is absolutely critical in ensuring sub-second delivery.
Where we find the query response time of MySQL unacceptable, we rely on Redis key-value store for caching. Instances on EC2, working in master/slave mode host the Redis datastore.
User's profile photos and other images, such as those posted using Twitter Post app inside Imsy, are stored on Amazon S3.
The "apps" inside Imsy - such as breaking news, entertainment, social networking, community chat and contests are built on the RESTful Developer APIs - available to 3rd party developers. Our own developers also use the same APIs to create some of these on-the-fly apps. These are hosted on a separate datacenter and have own load balancers and databases. The language of choice for all apps built by our own team continues to be Node.js - you can say, we just heart Node.js and all its great auxiliary tools like NPM, dnode (for RPC), Knox (for S3), Cron (for scheduling tasks) and many others.
For monitoring the server performance and uptime, we use the fantastic tools forever and monit and the excellent service provided by @PagerDuty. For global SMS Push, to validate user's phone number during registration, we rely on @BulkSMS. And for real-time feed parsing of all the 3rd party news and content, our PubSubHubbub provider of choice is @Superfeedr. Last, but not the least, all the code and version jungle is managed using Git (of course!).
Right now, we are a small team of 4 developers. As we expand our platform coverage to serve an ever increasing community of users and add many new interesting features and apps, we can do with some help, though! If you are a developer well versed with some or any of the above stuff, and excited about joining this party, let's talk.