For my app, i'm storing data in simpleDB, but since SimpleDB has a 1开发者_如何学Go024 character per attribute maximum so larger values should be stored in S3.
I'm doing something like this ::
@Basic(fetch=FetchType.LAZY) @Lob private byte[] multimedia; //to be stored in s3and @Lob on its getters and setters The JPA query is giving no error....but NO multimedia field is being created either in s3 or simpleDB. Kindly guide where to look for solution to this problem
Also suggest how to make the rows of simpledb refer to same multimedia object in s3(to reduce data redundancy) as when i did this by manually creating lobkey and tried to use that value in another object...it created a new copy in s3 with a new key.
Thanks
You can store your multimedia files on Amazon s3 and store Public URL of that multimedia file on Amazon SimpleDB.
Let's suppose you have am image say.. my_image.png. Upload that image to Amazon s3 in your desire bucket.. say my_bucket. Generate public URL of that uploaded s3 object. It would be. http://my_bucket.s3.amazonaws.com/my_image.png. Upload that public URL to Amazon SimpleDB.
It will easy your task and you can sync your uploaded data over Amazon Simple-db and Amazon s3.
精彩评论