• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: coreData and interapp comm via TCP/IP
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreData and interapp comm via TCP/IP


  • Subject: Re: coreData and interapp comm via TCP/IP
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 30 Apr 2010 10:00:23 -0700


On Apr 30, 2010, at 1:00 AM, justin webster wrote:

I'm wanting to build an app which functions as both server and client - performing reasonably simple querying and file management between instances of the app across a LAN.
each instance needs to keep it's own persistent data as well as be able to query, read and write data from other instances on the local network.

You're talking about building a peer-to-peer app with continuous synchronization of its data model. In the general case this is pretty damn difficult to do; I spent at least six months working on it a few years ago and didn't get anything finished. There are all sorts of interesting problems like peer discovery, authentication, permissions, data conflicts and merging, disconnected operation, etc. Many research papers have been published on these topics. I would highly suggest reading up on the literature before starting, at least to get an idea of how complex the problem space is. (The O'Reilly book "Peer-To-Peer" from 2002 is a good place to start.)


On the other hand, if you're willing to cut down the features (LAN only, assume peers are trustworthy, etc.) it gets simpler. You still have to deal with the syncing problems like conflicts and disconnection/reconnection, though.

If I were starting something like this today I would probably base it on CouchDB <http://couchdb.apache.org>, a non-relational data store that has built-in support for syncing data between multiple instances of itself. I'm not aware of any Cocoa interfaces to CouchDB, but the API is REST-based so it's pretty easy to access using NSURLConnection and an open-source JSON parser.

on the face of it coreData with bindings seems a good fit except for the multi client nature of this project.

CD will help with the storage on an individual peer, but it has nothing to do with the communication or syncing layers. Those would have to be built on top.


One concrete thing that came out of my investigation were the libraries MYNetwork and MYCrypto. The first provides high level networked messaging, with local peer discovery over Bonjour; the second provides a Cocoa interface for cryptographic operations like public keys, signing and encryption. They're available at http://bitbucket.org/snej/ .

—Jens_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >coreData and interapp comm via TCP/IP (From: justin webster <email@hidden>)

  • Prev by Date: Re: Help with text input
  • Next by Date: Re: Help with text input
  • Previous by thread: Re: coreData and interapp comm via TCP/IP
  • Next by thread: HTML link tree browser OS component
  • Index(es):
    • Date
    • Thread