How to implement a bidirectional network between an iPhone application and an Objective-C server application?

I’m looking for advice on the best way to implement some kind of bi-directional communication between a “server” application written in Objective-C and running on a Mac and a client application running on an iPhone,

To shorten the long story, I am adapting an existing library for use in a client-server environment. A library (which runs on a server) is basically a search engine that provides periodic results and can optionally provide updates for any of these results at a later stage. Therefore, in an ideal world, I could achieve the following with my hypothetical network solution:

  • Start requests on the server.
  • Ask the server to "push" the results to the client as they arrive.
  • Ask the server to “push” updates for individual results to the client as they become available.

If I were writing this client to run on another Mac, I could take a look at using Distributed Objects to hide the fact that the server was actually running remotely, but DO is not available on the iPhone.

If I were writing a more general client-server application, I would probably look at using HTTP to provide some kind of RESTful interface for searching, but this solution is not amenable to asynchronous updates, and besides, what I offer is good It’s combined with a “standstill” REST webnet: I will need to simulate my protocol so that I “create” a search resource that could subsequently request a status, and I would have to poll its updates.

, -, , - BLIP, "" , , , , , , . BLIP , , :

  • ? , "" , ?
  • iPhone: , ? HTTP: COMET , .

, : , . , , , .

iPhone Objective-C?

+3

Source: https://habr.com/ru/post/1733330/


All Articles