I'm looking to create a client/server application for iOS devices, where client is the iPhone/iPad and server is hosted either at home (Macbook w/ Apache) or online. I've seen many methods suggested in my googling, but the most common method seems to be HTTP POST and GET requests.

I'd like to know if there are any limitations of using HTTP for a client/server-based iOS application before I get too involved with the implementation. Performance is not my first priority, as I'd only be sending small amounts of data at a time. Also, is using Apache HTTP Server a viable solution, or should I use a different tool on the server side? Pardon my inexperience in the area. Thanks in advance.

I've also heard of Parse and Amazon EC2, can anyone vouch for either?

EDIT:
To clarify, the server would be a single computer/host for all clients, not one server per client. I'd also like the cheapest (if not free) solution available.

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.
If this question can be reworded to fit the rules in the help center, please edit the question.

You need to clarify here when you say server - is this a server the end user installs on their machine to act as a server to their copy of the app, or one you are going to be running and hosting for customers. If the former, wouldnt apache be a serious overkill?
–
GrandmasterBJan 16 '12 at 5:13

@GrandmasterB Apologies, edited to specify that the server would be a single computer for all clients.
–
johnluttigJan 16 '12 at 5:17

1

Are you planning on making a serious application for iOS where your server will be at your house?
–
mhoran_psprepJan 16 '12 at 11:31

@mhoran_psprep After further research, I realized that an in-home server would be impractical for anything beyond an app that's for play. I think I'm going to use Parse, which seems to suit my needs perfectly; i.e. backend server with minimal set-up/maintenance.
–
johnluttigJan 17 '12 at 1:37

1 Answer
1

So to start off, I'll mention that you've been a bit vague on the details of your client/server app. You haven't mentioned what kind of data you'll be serving (static vs dynamic). Along the same lines, you haven't described the architecture of your iOS client. Will your clients periodically poll for new data (pull), or will you need to send them realtime updates every now and then (push). Having said that, here are a few things to consider:

What are the limitations of HTTP POST and GET requests?

For the most common types of applications utilizing the client/server architecture, HTTPPOST and GET requests are quite adequate. Most webservices are built on this model. This works fine for if/when your app needs to periodically send or receive data from the server. You app has to be able to efficiently utilize battery life and this is a reasonable archtitecture for this scenario.

If your app somehow deals with realtime data, polling is no longer an option. If, for example, you build a chat application. You cannot expect to continuously poll for new (chat) messages and also reasonably conserve battery life. This is where push technology comes into play. Now how would you use push technology along with regular HTTP GET? Quite simple. Whenever your server has something new for the client, it sends a wakeup signal to your app, at which time your app initiates a GET and fetches this new data (like it normally would). Both iOS and Android have this feature in the form of Apple Push Notifications and C2DM.

Server Hosting

If you plan to create a production application in the App Store, I would not recommend you host your server at home (I cannot stress this enough). Now no matter where you plan to host it, you have a few things to consider:

Do you have the expertise to administer/maintain/patch this server?

If at home, will you have a contingency plan for your app in the scenario your your network goes down (or gets saturated), etc?

Are you reasonably comfortable administering an Apache HTTP server and are you able to fine tune it for if/when your app grows?

If you go with Amazon EC2, are you comfortable administering/maintaining/patching a (CLI) Linux server?

Building a webapp that can serve HTTP requests on App Engine is quite simple and you have the option of using Java, Python, and a few other languages. The advantage here is that if/when your app becomes popular, App Engine will take care of the scaling for you with no more effort on your part. Also, if your app is small enough, you can quite easily stay within the free tier which would satisfy your price requirement (see pricing).

My final recommendation to you would be to use a service like App Engine just because all the nitty gritty details (below your app layer) are abstracted for you and it's something you won't have to think about. You won't have to worry about physical hardware (server at home) or scalability (server on EC2) - all this will be magically handled for you!