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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to