Hi All,
I implemented and published a Pharo client for Amazon's AWS S3 service called ZnAWSS3Client. For some background, see http://en.wikipedia.org/wiki/Amazon_S3 or http://aws.amazon.com/s3. The code can be found in the package 'Zinc-AWS' in http://www.squeaksource.com/ZincHTTPComponents.html. It depends on both Zinc HTTP Components and XML Support (an excellent package BTW) as well as on the cryptography functionality in Pharo (md5, sha1 & hmac). Basically, Amazon S3 (Simple Storage Service) is an online storage web service where you store and retrieve objects under keys organized in groups called buckets. Objects can be any web resource identified by a mime type. The main advantage is that S3 is a highly scalable, reliable, secure, fast, inexpensive service. The client is currently a proof of concept implementing the basic S3 concepts. Here is some example usage: | client | (client := ZnAWSS3Client new) accessKeyId: '2ZGSSBGBHQGJ9VV5N441'; secretAccessKey: 'OtxrzxIsfpFjA7SwPzILwy8Bw21TLhquhboDYROV'; checkIntegrity: true. client buckets. client keysIn: 'my-bucket'. client keysIn: 'my-bucket' query: (Dictionary with: 'prefix'->'my-'). client at: 'my-bucket' -> 'my-key'. client at: 'my-bucket' -> 'my-key' put: (ZnEntity with: '0123456789'). client at: 'my-bucket' -> 'my-key' put: (ZnEntity with: 'Smalltalk rules S3!') headers: (Dictionary with: 'x-amz-acl'->'public-read'). Sven PS: the code does contain comments but you will need to read up on S3 first. To run anything you will have to create an AWS S3 account. |
Thanks :)
Stef On Jan 5, 2011, at 9:36 PM, Sven Van Caekenberghe wrote: > Hi All, > > I implemented and published a Pharo client for Amazon's AWS S3 service called ZnAWSS3Client. > > For some background, see http://en.wikipedia.org/wiki/Amazon_S3 or http://aws.amazon.com/s3. > > The code can be found in the package 'Zinc-AWS' in http://www.squeaksource.com/ZincHTTPComponents.html. It depends on both Zinc HTTP Components and XML Support (an excellent package BTW) as well as on the cryptography functionality in Pharo (md5, sha1 & hmac). > > Basically, Amazon S3 (Simple Storage Service) is an online storage web service where you store and retrieve objects under keys organized in groups called buckets. Objects can be any web resource identified by a mime type. The main advantage is that S3 is a highly scalable, reliable, secure, fast, inexpensive service. > > The client is currently a proof of concept implementing the basic S3 concepts. Here is some example usage: > > | client | > > (client := ZnAWSS3Client new) > accessKeyId: '2ZGSSBGBHQGJ9VV5N441'; > secretAccessKey: 'OtxrzxIsfpFjA7SwPzILwy8Bw21TLhquhboDYROV'; > checkIntegrity: true. > > client buckets. > > client keysIn: 'my-bucket'. > > client keysIn: 'my-bucket' query: (Dictionary with: 'prefix'->'my-'). > > client at: 'my-bucket' -> 'my-key'. > > client at: 'my-bucket' -> 'my-key' put: (ZnEntity with: '0123456789'). > > client at: 'my-bucket' -> 'my-key' put: (ZnEntity with: 'Smalltalk rules S3!') headers: (Dictionary with: 'x-amz-acl'->'public-read'). > > Sven > > PS: the code does contain comments but you will need to read up on S3 first. To run anything you will have to create an AWS S3 account. > > > |
In reply to this post by Sven Van Caekenberghe
>
> > (client := ZnAWSS3Client new) > accessKeyId: '2ZGSSBGBHQGJ9VV5N441'; > secretAccessKey: 'OtxrzxIsfpFjA7SwPzILwy8Bw21TLhquhboDYROV'; > checkIntegrity: true. > > client buckets. > > client keysIn: 'my-bucket'. > > client keysIn: 'my-bucket' query: (Dictionary with: 'prefix'->'my-'). > > client at: 'my-bucket' -> 'my-key'. > > client at: 'my-bucket' -> 'my-key' put: (ZnEntity with: '0123456789'). > > client at: 'my-bucket' -> 'my-key' put: (ZnEntity with: 'Smalltalk rules S3!') headers: (Dictionary with: 'x-amz-acl'->'public-read'). > > Sven > > PS: the code does contain comments but you will need to read up on S3 first. To run anything you will have to create an AWS S3 account. > Nice! Did you check the work of Ernst Micklei and Jan van de Sandt? They implemented smalltalk libraries for S3, but in addition other services (e.g. SimpleDB) http://blog.doit.st/ http://www.slideshare.net/esug/cloudfork -- Marcus Denker -- http://www.marcusdenker.de INRIA Lille -- Nord Europe. Team RMoD. |
In reply to this post by Sven Van Caekenberghe
That's great!
Noury On 5 janv. 2011, at 21:36, Sven Van Caekenberghe wrote: > Hi All, > > I implemented and published a Pharo client for Amazon's AWS S3 service called ZnAWSS3Client. > > For some background, see http://en.wikipedia.org/wiki/Amazon_S3 or http://aws.amazon.com/s3. > > The code can be found in the package 'Zinc-AWS' in http://www.squeaksource.com/ZincHTTPComponents.html. It depends on both Zinc HTTP Components and XML Support (an excellent package BTW) as well as on the cryptography functionality in Pharo (md5, sha1 & hmac). > > Basically, Amazon S3 (Simple Storage Service) is an online storage web service where you store and retrieve objects under keys organized in groups called buckets. Objects can be any web resource identified by a mime type. The main advantage is that S3 is a highly scalable, reliable, secure, fast, inexpensive service. > > The client is currently a proof of concept implementing the basic S3 concepts. Here is some example usage: > > | client | > > (client := ZnAWSS3Client new) > accessKeyId: '2ZGSSBGBHQGJ9VV5N441'; > secretAccessKey: 'OtxrzxIsfpFjA7SwPzILwy8Bw21TLhquhboDYROV'; > checkIntegrity: true. > > client buckets. > > client keysIn: 'my-bucket'. > > client keysIn: 'my-bucket' query: (Dictionary with: 'prefix'->'my-'). > > client at: 'my-bucket' -> 'my-key'. > > client at: 'my-bucket' -> 'my-key' put: (ZnEntity with: '0123456789'). > > client at: 'my-bucket' -> 'my-key' put: (ZnEntity with: 'Smalltalk rules S3!') headers: (Dictionary with: 'x-amz-acl'->'public-read'). > > Sven > > PS: the code does contain comments but you will need to read up on S3 first. To run anything you will have to create an AWS S3 account. > > > |
In reply to this post by Marcus Denker-4
On 06 Jan 2011, at 10:44, Marcus Denker wrote: > Nice! Thx. > Did you check the work of Ernst Micklei and Jan van de Sandt? > They implemented smalltalk libraries for S3, but in addition other services (e.g. SimpleDB) > > > http://blog.doit.st/ > http://www.slideshare.net/esug/cloudfork Yeah, I know about that project, they did some cool stuff. I did an S3 client myself for two reasons: (1) I wanted it for myself (always a very good reason) (2) I consider it a validation for Zn (and I was happy with it, the code is quite elegant) Sven |
can we add it to
http://book.pharo-project.org/book/PharoTools/ ?? thanks On Fri, Jan 7, 2011 at 8:47 PM, Sven Van Caekenberghe <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |