Take the 2-minute tour ×

I have some experience regarding IPhone and Android development but I am now struggling to solve a new class of problem: apps that involve a client/server chatroom feature. That is, an app when people can exchange text over the internet, and without having the app to constantly “pull” content from the server.

So that problem can’t be solved with a normal php/mysql website, there must be some kind of application running on a server that is able to send message from the server to the phone, rather than having the phone to check for new messages every 10 seconds.

So I’m looking for ways to solve the different problems here:

  • What framework should I use on the two sides (phone / server)? It should be some kind of library that doesn’t prevent me to write paid apps. It should also be possible to have the same server for the Iphone and android version of the app.
  • What server / hosting solution do I need with what sort of features, I just have no experience regarding server application that can handle and initiate multiple connections and are hosted on hardware that is always online

I tried to find resources online but couldn’t so far, either the libraries had the wrong kind of license/language or I just didn’t understand. Sometimes there were nice tutorial but for different needs such as peer2peer chat over local network. Same with the server and the hosting problem, not sure where to start really, I’m calling for help and I promise I will complete this page with notes about the experience I will get.

Obviously the ideal would be to find a tutorial I missed that include client code, server code and a free scalable server. That being said, If I see something as good, it probably means that I have eaten the wrong kind of mushroom again. So, failing that, any pointer which might help me toward that quest, would be greatly appreciated.

share|improve this question
I am not sure, but doesn't have the google appengine a push to device functionality? –  WarrenFaith Jun 8 '11 at 23:31
How can a client A talk to client B without getting messages sent by client A from the server? A chatroom in the very context is a server client app model. You have to poll either each of the clients to get the messages sent by them or the server. –  Ramhound Jun 23 '11 at 12:00
@Ramhound has it. The illusion of "push" is accomplished by a "poll and pull" approach, where the client pings the server or peers fairly frequently for updates. For sure if you're planning to use HTTP and a web server, that's really the most workable way to go. –  Dan Ray Dec 27 '11 at 14:15
add comment

1 Answer

up vote 2 down vote accepted

If you want to do Cross-Platform you might want to go for Urban Airship. This is a commercial service, but they do have a free plan (up to 1 million message a month, $0.0010 per extra message). They also have an 'advanced package' for unlimited sending. Don't know the price (http://urbanairship.com/pricing)

If you're only targeting Android I would go for Google's Cloud to Device Messaging Framework (C2DM). Yes, it's only supported for devices that run API level 2.2 and up, but it's the same technology -- and persistent connection with the phones -- that Google uses for it's own apps which use push notifications.

An Android alternatives might be The Deacon Project. It is Open Source, still in beta (last code drop is from 2010. Don't know if it is actively being developed any longer) but it supports older versions of Android

Good luck with the implementation!

share|improve this answer
add comment

Your Answer


