Cloud Services – Advice on Cloud Service and IM Protocol for Group Chat Mobile App

amazon ec2androidazurecloud computingiphone

Overview
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 🙂

Best Answer

Protocol

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.

Related Topic