views:

151

answers:

2

I am curious if my persistent object of Core Data can be stored and retrieved using Amazon S3.

I think it is a perfect combination to put your application on the cloud.

Or Amazon has other services?

Has anyone had any success stories to share?

Edited:

I know that there is no direct support of Core Data for S3, but there is ASIS3Request available to save and load any object on S3.

My solution: in the app delegate, I will modify the persistentStoreCoordinator to save on Amazon S3.

+1  A: 

Though there's no direct Core Data support for Amazon S3 as a store type, Core Data allows Custom Store Types. This fact is referenced in the iPhone Core Data docs, so I assume it's available on the iPhone platform.

Joshua Nozzi
hi, I edited the question.
sfa
I should've been more specific. Yes, you'd create a custom store type that fetches and saves objects to S3 via some mechanism. ASIS3Request and friends does look promising as such a mechanism.
Joshua Nozzi
+2  A: 

Sounds like a terrible idea to me. The performance would be abysmal since you are taking something that is inherently designed to be a local cache and moving it up into the cloud.

You are far better off having a local cache and then periodically storing a copy of the file up in the cloud.

What is your goal behind storing the data on S3?

Marcus S. Zarra
Ohh thank you very much Marcus! You have cleared my doubt. But how do you appoach on an application that needs to store both data files along with a database in the cloud? An example: A real estate company that offers the users the ability to upload both images, videos and information of the client's house?
sfa
Pretty much the same solution. I would sync the data up into the cloud periodically and treat the copy that is on the phone as a cache.
Marcus S. Zarra
Hi Marcus, is it the normal way of doing a social network application on the iphone? I guess it'll be too complicated :-s
sfa
No, a social network application normally hits a REST server and caches data locally where it makes sense.
Marcus S. Zarra
Thank Marcus!!!
sfa