I’m going to develop an app on Android and iOS. It will allow users to set up group ‘chat rooms’ and talk on chat rooms set up by other users. The service needs to be highly scalable, such that it could accommodate a massive increase in users overnight (we can only dream).

Background info
Previously I've used mainly Java and Python, but the most appropriate languages for this task should be used. I don’t mind learning a lot of new skills.

Chat requirements
The chat protocol should be flexible: it should allow for determining who can view/post on ‘chat rooms’ based on factors determined by the first poster/creator of the particular ‘chat room’. It should also allow for users to simply install the app and begin using the service, after only providing a simple nickname (which could be changed later).

Chat protocol plans
Having looked around I think the XMPP protocol is the best candidate. In particular the Multi-user chat extension looks like what I’ll need. Would this be most suited to my requirements, or do you know another potential solution?

Update: I've since researched the Protocol for SYnchronous Conferencing and it seems to fit perfectly with my needs. However I am unsure how well documented it is or how I would actually implement it.

Cloud service
I have been deciding between Amazon Web Services, Google App Engine and Windows Azure. I’m coming to the conclusion that Azure will be best, as it is easier to manage than AWS (ease of scalability will be a key factor in the design), I think it may be less restricted than GAE, plus Azure will soon have toolkits to allow easy interfacing with both Android and iOS phones.

Update: Looking into it further it seems that AWS would be cheaper, and that they do have provisions, such as Elastic Load Balancing and Auto Scaling, that makes the extra work needed to maintain scalability fairly negligible.

Is this the decision you would have made, or would you recommend/look into other cloud services?

General Requirements
Any components should be well documented, proven reliable and preferably high-level where possible. For example I would prefer to use a plugin to implement the chat protocol rather than write it myself - thus leaving it to more experienced people.

Thank you
Thanks for reading, and any advice you have about any aspect would be greatly appreciated :-)

  • Looking into other aspects more, I've come to the conclusion that I still have no idea which cloud provider to go with. AWS looks like it may be cheaper than Azure, and upon closer inspection it does have some good tools for auto-managing scalability.
    – Jon Cox
    Jun 20, 2011 at 15:56
  • I'm not sure I entirely sure what you're looking for. Could you ask more specific questions? "Is this the decision you would have made?" is quite subjective. You ask for advice on protocol (good), but the whole thing reads like an RFC rather than a good SE question. Jun 22, 2011 at 16:31
  • It was my impression that programmers.stackexchange is the place for subjective questions on software development. As such there are many possible solutions to the things I've asked, and I'd be very interested in different peoples opinions on any of them :)
    – Jon Cox
    Jun 22, 2011 at 20:34
  • True, but according to the FAQ, "You should only ask practical, answerable questions based on actual problems that you face. Chatty, open-ended questions diminish the usefulness of our site and push other questions off the front page." In other words, the more specific the better. You can be both subjective and specific, so direct questions are still better than RFCs. The difference is here, I might suggest you clarify your question, while on SO, it would be closed (though, yes, it's already too subjective for SO no matter how specific). Jun 22, 2011 at 20:48
  • Don't get me wrong, it's a very good question, but it could still be better. Jun 22, 2011 at 20:50

2 Answers 2



Yes, this is going to sound like a cop-out but it's really up to you. Honestly, what you've described sounds a heck of a lot like IRC, but XMPP is quite extensible and widely used, so it's probably the easiest non-IRC to get working and to get support for. You're going to be able to find a lot of examples for both platforms, and likely even already-prepared libraries, if you want to go that direction. I'm not going to go recommend any, but a quick search should be a very useful tool here. There's no one right answer, but XMPP is certainly not a bad choice.

Cloud Service

Both Azure and AWS are very good services. A lot of high-profile or important applications run on each of them. One of the reasons I tend to favor Azure over AWS, however, is that Microsoft really tries to make it easy for you to get it. If you haven't yet, I would look into Bizspark, which, if you get approved for, will give you, among other things, a free small instance of Azure. To be fair, Amazon does the same kind of thing, but they seem to give you a little bit less, and only for a year (Bizspark is for 3 years). On the other hand, Bizspark actually requires that you get approved, while Amazon really just gives it to you pretty easily.

All in all, either is really a good service to go with, and both Microsoft and Amazon tend to be very committed to helping developers get things done, so you can't go wrong either way. The best way of deciding is to look at the features they offer compared to what you need, and the pricing for your minimum and ideal levels. For example, if you did want to support Windows Phone, Azure might be a better option, because they work well together, but if you wanted to leverage fulfilment services and ship tshirts or coffee mugs or anything like that in connection, Amazon might be the better choice (Note: Don't read into either of these; I purposely picked two scenarios that you didn't mention just to give an example of some of the unique features of the services.)

As for the Elastic Load Balancing and Auto Scaling, that's just AWS branding what cloud servers in general do. All decent cloud services will make scaling your system technologically negligible, at least from their side (if you happen to have bad code that doesn't scale well, you can't really blame it on them...). So yes, those are good things, but everyone has them, so they shouldn't be a decision maker.

  • Thank you for your answer. It definitely helped me think more about what is actually going to be required, and clarified my thoughts on other areas. Cheers.
    – Jon Cox
    Jun 22, 2011 at 20:48
  • IRC was the first thing that popped into my head as well. It's an extremely well documented and simple protocol, and well designed for scaling up to large numbers of users.
    – Cercerilla
    Jun 23, 2011 at 20:26

I don't know anything about chat protocols so I will skip to the cloud bit.

I don't like the idea of hosting a whole presence in the cloud.

Why not start with 2 small virtual server’s setup in failover mode? There are providers who offer enough facilities to balance 2 small virtual instances geographically for $40 a month.

As you grow, increase/decrease your virtual instance size/quantity as required while using the cloud for bursting. VPS is cheaper than hourly instances used full time.

It seems to me that your system can be partitioned easily based on chat rooms. Different resources host different chat rooms – and they move around based on the number of concurrent users to approach near optimal distribution.

This leaves two technical challenges: 1: How do you migrate a room to a new server mid-flow? 2: How do you cope with a room that needs more resources than a single compute unit/vps unit?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.