13. CODE AND SIGN THE HTTP REQUEST
PUT /adriansmovies/sushi.avi HTTP/1.1
PUT /sushi.avi HTTP/1.1 Host: <account>.blob.core.windows.net
Host: adriansmovies.s3.amazonaws.com Content-Length: 734859264
Content-Length: 734859264 Date: Wed, 01 Mar 2006 12:00:00 GMT
Date: Wed, 01 Mar 2006 12:00:00 GMT Authorization: SharedKey <app>:signature
Authorization: signature x-ms-meta-Chef: Kawasaki
x-amz-meta-Chef: Kawasaki
POST /namespace/adriansmovies/sushi.avi HTTP/1.1
PUT /<api version>/<account>/
Content-Length: 734859264
adriansmovies/sushi.avi HTTP/1.1
Date: Wed, 01 Mar 2006 12:00:00 GMT
Host: storage.clouddrive.com
x-emc-uid: <uid>
Transfer-Encoding: chunked
x-emc-signature: signature
X-Auth-Token: session-token
x-emc-meta: Chef=Kawasaki
X-Object-Meta-Chef: Kawasaki
Monday, July 12, 2010 13
14. CODE AND SIGN THE HTTP REQUEST
GET /ws/IMFS/GetStorageNodeExtended.ashx?&fileOverwrite=true&ipRestricted=true&destFolderPath= adriansmovies&sizeBytes=
734859264&firstByteExpiration=6000&lastByteExpiration=259200&sessionToken=session-token HTTP/1.1
POST /Upload.ashx?uploadToken=from_above&destFolderPath=adriansmovies HTTP/1.1
Host: from_above
Content-Length: 734859382
Content-Type=multipart/form-data; boundary=--jclouds--
Authorization=Basic GpjbG9=
----jclouds--
Content-Disposition: form-data; name="sushi.avi"; filename="sushi.avi"
Content-Type: application/octetstring
...
PUT /ws/Metadata/SetMetadata.ashx?&path=Folders/adriansmovies/sushi.avi&sessionToken=session-token&metadata=Chef:Kawasaki HTTP/1.1
Monday, July 12, 2010 14
15. CODE AND SIGN THE HTTP REQUEST
POST /<api version>/containers/id_of_ adriansmovies/contents HTTP/1.1
Content-Length: 734859382
Content-Type=multipart/form-data; boundary=--jclouds--
Authorization=Basic GpjbG9=
----jclouds--
Content-Disposition: form-data; name="sushi.avi"; filename="sushi.avi"
Content-Type: application/octetstring
...
PUT /<api version>/files/from_above/metadata/Chef HTTP/1.1
Content-Length: 8
Content-Type: text/plain
Authorization: Basic GpjbG9=
Kawasaki
Monday, July 12, 2010 15
16. do you want to
• Deal with Errors
• Deal with Concurrency
• Deal with Cloud Complexity
Monday, July 12, 2010 16
17. jclouds
open source
feels like java (and clojure)
portability between clouds
deal with web complexity
unit testability
thread-safe and scalable
Monday, July 12, 2010 17
18. Tools we provide
• Abstractions
• BlobStore ( atmos, azure, rackspace, s3 )
• Compute ( vcloud, ec2, gogrid, ibmdev,
rackspace, rimu )
• Clojure bindings
• Third-party library integration
Monday, July 12, 2010 18
19. Alternatives to jclouds
• Roll-your-own
• Jersey, RESTEasy
• EC2-based cloud apis
• typica, jets3t
• Dasein Cloud API
• Service provided SDKs
Monday, July 12, 2010 19
22. commons vfs
vfs > open blobstore://user:key@cloudfiles/mycontainer
Opened blobstore://cloudfiles/mycontainer/
Current folder is blobstore://cloudfiles/mycontainer/
vfs > ls
Contents of blobstore://cloudfiles/mycontainer/
README.txt
0 Folder(s), 1 File(s)
vfs > close
Monday, July 12, 2010 22
24. Provisioning
• The Good, the Bad, and the Ugly
• Java Code
• Clojure Code
Monday, July 12, 2010 24
25. The Good
provisioning (and re-provisioning) is cheap
APIs = automation
tools exist
Monday, July 12, 2010 25
26. The Bad
forgetting to turn things off
licensing
erratic service quality
Monday, July 12, 2010 26
27. The Ugly
cloud apis are sometimes unreliable
apis are very different across clouds
features are very different across clouds
accidental complexity
Monday, July 12, 2010 27
28. Things to consider when provisioning
Can you create an image?
Can you push credentials or files?
Do you need to VPN in?
How is storage provisioned?
How close are your dependencies?
Monday, July 12, 2010 28