0

For my app, i'm storing data in simpleDB, but since SimpleDB has a 1024 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 s3

and @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

r15habh
  • 1,468
  • 3
  • 19
  • 31

1 Answers1

1

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.

Ashish Pancholi
  • 4,569
  • 13
  • 50
  • 88
  • yeah, @Lob thing did proved to be a pain. I've used UUID class for syncing uploaded data over simple-db and s3, guess that should not hurt. Thanks for the reply :) – r15habh Mar 21 '11 at 21:34