drewmccormack / ensembles

A synchronization framework for Core Data.
MIT License
1.63k stars 131 forks source link

Merge frequency, Dropbox #186

Closed gazzer82 closed 9 years ago

gazzer82 commented 9 years ago

Hi,

So i am looking to use this framework so sync data between an iOS and OS X application. At the moment i am using Simperium but would like to move away from a server based model (that we have to pay for).

One of the things however we like about Simperium is the speed with which it syncs. With ensembles realistically how often can we try and merge from dropbox (maybe adding about 100 text only object per 1 minute) and when running the merge approximately how long will the changes take to merge and save?

I am planning to try this out and check everything properly, but if the answer is maximum every two minutes then this is not the framework for us and i won't bother to start the in depth testing.

Thanks

Gareth

drewmccormack commented 9 years ago

You can sync as often as to like. 100 text objects should save in much less than a second, and generate a JSON file (in ensembles 2) similar to whatever Simperium was sending.

The bottleneck will usually be the backend. Everytime you merge, it will hit Dropbox servers.

I think once every 30s is not unreasonable.

With a backend like iCloud, we can detect new files arriving and trigger a merge. This is like push.

I will probably be supporting the Dropbox sync API soon, and CloudKit, and both can generate these 'pushes'.

That is what ensembles gives you over other solutions — options when it comes to your backend.

Drew

gazzer82 commented 9 years ago

Hi Drew,

Thanks for the info.

To add a little complexity, I would like the data to be shared amongst several users, I was thinking of doing this by storing credentials for a web service (possibly WebDAV) and the getting the users to enter a unique code which would be the ensembles container identifier. I would check this is valid with an external node.js app in code before allowing the application to proceed.

Does this wound workable to you?

Also, I'm guessing this could be simplified if it was build on CloudKit as it supports ACL/Permissions, plus then in theory I would get push of the sync rather than having to pull it on a schedule? In which case I would be very interested in a cloud kit addition to the library!

Cheers

Gareth

drewmccormack commented 9 years ago

Yes, multiple users is possible, but as you say, you basically have to handle that end. A node.js authenticating server would be one way.

CloudKit would issue push, and I will no doubt use that in the Ensembles backend to notify the app of newly available data.

Kind regards, Drew

On Sep 5, 2014, at 6:25, gazzer82 notifications@github.com wrote:

Hi Drew,

Thanks for the info.

To add a little complexity, I would like the data to be shared amongst several users, I was thinking of doing this by storing credentials for a web service (possibly WebDAV) and the getting the users to enter a unique code which would be the ensembles container identifier. I would check this is valid with an external node.js app in code before allowing the application to proceed.

Does this wound workable to you?

Also, I'm guessing this could be simplified if it was build on CloudKit as it supports ACL/Permissions, plus then in theory I would get push of the sync rather than having to pull it on a schedule? In which case I would be very interested in a cloud kit addition to the library!

Cheers

Gareth

— Reply to this email directly or view it on GitHub.