I am new to writing Rails and APIs. I need help solving S3. Here is my problem.
I am writing an API for an iOS application where users log in with the Facebook API on iOS. The server checks the user for problems with the Facebook token for the iOS user and issues a temporary session token. From now on, the user needs to download content that is stored in S3. This content belongs only to the user and a subset of his friends. This user can add more content on S3, which can be accessed by the same group of people. I think this is like attaching a file to a Facebook group ...
There are two ways the user interacts with S3: leave it on the server or force the server to issue a temporary S3 token (not sure about the possibilities here), and the user can directly type the content URLs to S3. I found this question talking about approaches, however it is really outdated (2 years ago): Architectural question and the question of downloading photos from the iPhone application and S3
So the questions are:
- Is there a way to restrict user access to certain content on S3 when issuing a temporary token? How can i do this? Suppose there are ... say, 100,000 or more users.
- Can I let an iOS device directly pull this content?
- Or should the server control all the content passing through (this, of course, solves the problem)? Does this mean that I need to upload all the content to the server before transferring it to connected users?
- If you know the rails ... can I use paperclip and aws-sdk gems to achieve this setup?
Sorry for a few questions, and I appreciate any understanding of the problem. Thank:)
api ruby-on-rails amazon-s3 amazon-ec2 client-server
dineth May 30 '12 at 6:28 2012-05-30 06:28
source share