Re: Crazy???, big picture questions.
Re: Crazy???, big picture questions.
- Subject: Re: Crazy???, big picture questions.
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Fri, 03 Aug 2012 10:34:59 +0100
On 2 Aug 2012, at 23:25, Kevin Bracey wrote:
> Am I correct in thinking that the RemoteCurrency example is ideal for an App where the devices on the network need to chat back and forth, while HTTP is more for a main device/server handing out data with limited back and forth.
RemoteCurrency was written to help folks who can't use HTTP, typically because they're implementing some other protocol. If you're writing a program to deliver email over SMTP, RemoteCurrency is a good start for that. Likewise if you're talking to a device that supports some wacky custom protocol.
On 3 Aug 2012, at 01:15, Jens Alfke wrote:
> Another possibility is to write the server (teacher) side as a real web-app, i.e. in PHP or Ruby or Python or something. These languages have high-level support for acting as servers, and while the clients are usually web browsers they don't have to be; they can be iOS apps sending custom HTTP requests.
I think this idea has a lot of merit. Writing an HTTP server using Apple's APIs is un-fun, but these web-focused languages are ideal for that task.
Ultimately I think that your protocol choice depends on what you're app is doing. If it's primarily client driven (that is, the clients make requests to the server and receive a response for each request) HTTP is great. If your app has other requirements (for example, async notifications from the server to the client) HTTP starts to break down [1] and you might want to start looking at a custom protocol.
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
[1] It's possible to do this sort of thing using HTTP, but all of the approaches are kind hackish.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden