RKSyncManager or an alternative approach?

320 views
Skip to first unread message

Del Brown

unread,
Dec 20, 2012, 10:45:13 AM12/20/12
to res...@googlegroups.com
Greetings!

I am new to RestKit and am planning to use it for an iOS app I've just started.  The app will also use Core Data.

The app will communicate with a backend server but at times may lose network connectivity.  When it regains network connectivity, it may need to sync new data generated in the app while it was offline, but also refresh stale data that may be newer on the backend server.

I had thought about using RKSyncManager but after some research it looks like it may not be ready yet?  Is that a correct statement?  If so, any recommendations on an alternative approach?  Not asking for anyone to code this for me, just looking for the right direction to go with this to hopefully avoid too many regrets when the app is complete.

Thanks in advance!

Del

LC

unread,
Dec 21, 2012, 4:20:29 AM12/21/12
to res...@googlegroups.com
Hi Del, I'm trying to do almost the same thing. I've taken a look to RKSynsManager, but it seems not to be updated recently. 
So I've started trying the basic functionalities I will need for synching Core Data with a backend server: get and post operations mapping JSON to Core Data and vice versa. I'm having a hard time accomplishing this simple task, did you try something similar?
thanks,
Laura

Del Brown

unread,
Dec 21, 2012, 10:33:42 AM12/21/12
to res...@googlegroups.com
Hello Laura,

I am currently configuring RestKit for my app, but have only recently started.  I am going to do everything except for the syncing, while I wait to see if I get any feedback from the RestKit community.

But it does sound like you and I are trying to build the same technology solution.

If I don't hear back, I will research Core Data syncing solutions/approaches and pick one.

e.g. Here is a link to a Ray Wenderlich tutorial, which covers core data syncing with a web service, but it isn't RestKit based:

http://www.raywenderlich.com/15916/how-to-synchronize-core-data-with-a-web-service-part-1

Good luck!

Del

Blake Watters

unread,
Dec 26, 2012, 1:06:53 AM12/26/12
to res...@googlegroups.com
Hi Del and Laura -

The RKSyncManager implementation was an incomplete pull request that has since been closed and is unmerged.

If you need write-back offline support and expect to find it out of the box, there are not currently any open source solutions available. This actually is not a simple problem, though the desire is obviously common.

RestKit does give you all of the tools you would need to implement such a system, but if you are looking for something turn-key its not available (anywhere). Synchronization is actually a really, really hard problem and no tutorials and small open source libraries lashed together is going to give you a robust solution.

If you really need turn-key synchronization for your app and you are just getting started, I would look at iCloud first. If that is unworkable, I would next recommend learning RestKit in and out and implementing a system on top of it. AFIncrementalStore could also be an interesting option, but it is immature, undocumented, untested and requires knowledge of Core Data that may be intractable for you.

If you go down the road outlined in that tutorial, you are going to be in a world of hurt -- you are buying a metric ton of complexity and engineering problems that you can't even see yet.

RestKit will be offering a turn-key synchronizatio solution at some point in the next few months, but we aren't there yet.


--
 
 

Del Brown

unread,
Dec 26, 2012, 11:02:53 AM12/26/12
to res...@googlegroups.com
Howdy Blake,

Thanks for the reply.  I was looking for the insight of someone like you who is deep into this.  So I truly appreciate the direction you've provided. 

The solution I need to implement will not be satisfied with iCloud.  I will be going for your other option: "learning RestKit in and out and implementing a system on top of it."
I've started implementing RestKit and really like what you have done.

Just to give you (and others reading this?) some feedback from someone new to RestKit.  In looking at the main page about RestKit, I somehow totally underestimated the value of the Object Mapping Reference.  That is absolute gold, in regards to understanding RestKit. 

The second thing that made a huge difference was configuring logging, which you have instructions on the main page about.  Because the Object Mapping Reference was so easy to follow, the logging is what made the difference in unearthing the mistakes I had made while trying to follow the well-written Object Mapping Reference.

Of course, everything else is helpful.  Just thought I would highlight a couple of things which stood out for me.

Finally, thank you for the tremendous work you've done with RestKit! 

Sincerely,
Del

LC

unread,
Dec 26, 2012, 3:37:38 PM12/26/12
to res...@googlegroups.com
Hi Blake and Del,
thank you both for the replies, the more I see the more I'm realizing this is a deep problem and also a very interesting topic. Personally, I've a lot to leran about Core Data itself and RestKit, and so your advices are more than useful to me.
I'm looking forward for the RestKit sync solution.
Greetings,
Laura

cric...@rccl.com

unread,
Mar 31, 2015, 4:04:33 PM3/31/15
to res...@googlegroups.com
Is there any progress on some type of sync manager for queueing and sync'ing updates done offline?
Reply all
Reply to author
Forward
0 new messages