|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Architecture QuestionsHi,
I have basic questions. I'm using the product but still trying to figure out what's the behavior. I couldn't find any white paper or anything. 1. I'm using the RestS3Service (S3Service) and I understand that default setting it can have multiple HttpConnection. When does the HttpConnection get established? Does it try to open multiple HttpConnection even though I'm only using one instance of s3? Or is it safe to say that S3Service only open one httpConnection in its life? 2. S3Service is thread safe right? 3. I'm trying to use it for my website where it push data to s3 whenever a user uploads something to the website. Do I use S3Service or S3ServiceMulti? 4. S3Service doesnt' have an API to delete an array of S3Object[] but S3ServiceMulti does? What does S3ServiceMulti does when I sent an array of S3Object[], does it spawn separate thread that establish separate httpconnection? Thanks in advance for the help. Cheers, rgn |
|
|
Re: Architecture QuestionsHi, The Java documentation for JetS3t is included if you download a public release zip file, and it can also be found along with lots of other documentation on the project's main web site here: http://jets3t.s3.amazonaws.com/toolkit/toolkit.html The best place to ask questions about the project and review prior discussions is on the "JetS3t Users" Google group here: http://groups.google.com/group/jets3t-users 1. I'm using the RestS3Service (S3Service) and I understand that default The S3Service (RestS3Service) classes are single-threaded, they do not use multiple HTTP connections. They open one HTTP connection for each operation you perform with the service. 2. S3Service is thread safe right? Yes. In fact, the multi-threaded service classes like S3ServiceMulti are just wrappers that run multiple threads on a single S3Service instance. 3. I'm trying to use it for my website where it push data to s3 whenever a It depends on what you need to do. If you only need to do one thing at a time, such as uploading a file as soon as you receive it on your website, the S3Service class will suffice. If you need to upload many files simultaneously, you may be better off using S3ServiceMulti or S3ServiceSimpleMulti -- the latter is a simplified multi-threaded implementation that makes it much easier to perform multi-threaded tasks. 4. S3Service doesnt' have an API to delete an array of S3Object[] but S3Service does one thing at a time. To delete multiple files with this class, you would use a loop that calls the delete operation with each iteration. The S3ServiceMulti and S3ServiceSimpleMulti classes sent multiple HTTP requests at the same time, so if you use the delete operations in these classes they will start many HTTP connections in separate threads. These classes manage the maximum number of simultaneous HTTP connections according to the preferences set in the jets3t.properties file. Hope this helps, James |
|
|
Re: Architecture QuestionsThanks for the quick response and yes it definitely helps. It's along the same line as my initial assumptions. I've been using the Java doc but I still needed additional clarification.
Thanks again and keep up the great work. Cheers, rgn
|
| Free embeddable forum powered by Nabble | Forum Help |