Upload
robert-daniel
View
610
Download
3
Tags:
Embed Size (px)
DESCRIPTION
GWU ECE289 Spring 2010
Citation preview
Virtual-Worlds in the Clouds
Grid Computing using on demand / pay as you
go VMs
eceCloudTM
ECE289 Class is using ececloudTM
Midterm
Grid Computing
Cloud Computing
Mobile Computing
Campus Computing
Augm
ente
dVi
rtua
l
Secu
re P
roto
cols
Cloud Layer and Grid Layer
Sim01.exe Sim02.exe Sim03.exe Sim04.exe
Sim05.exe Sim06.exe Sim07.exe Sim08.exe
Amazon EC2 RackSpace CloudRSC-VM01 RSC-VM02 RSC-VM03EC2-VM01 EC2-VM02 EC2-VM03
sim01 sim02sim03 sim04
sim05 sim06sim07 sim08
Inventory Server
Clou
d La
yer
Grid
Lay
er
Message ServerGrid ServerIRC Client/Relay IRC Client/Relay
VoIP ServerFreeSwitch
DataBase ServerMySQL
gwcloud.net ececloud.com gwcloud.org
Web Server
RackSpace Cloud
RSC-VM01 RSC-VM02 RSC-VM03
Rackspace Linux Virtual MachinesCl
oud
Laye
rG
rid L
ayer
Cloud Management of ServersCl
oud
Laye
r
Cloud APICl
oud
Laye
r
Cloud API: RESTful Web Services
• REST = Representational State Transfer• Conforming to the REST constraints is often referred to as
being ‘RESTful’• Roy Fielding Doctoral Dissertation “Roy Fielding "Architectural
Styles and the Design of Network-based Software Architectures” year 2000 http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
• “Adddressability is the idea that every object and resource in your system is reachable through a unique identifier……..URIs”– Scheme://host:port/path?queryString#fragment– http://example.com/customers?lastName=Burke&zipcode=02115
With REST over HTTP you do not have to worry about vendor interoperability you can focus on understanding the data format of the server and application interoperability . …. Bill Burke
Cloud API: CURL
• REST-esting with cURL• curl -i -H "Accept: application/json" -X POST -d "firstName=james"
http://192.168.0.165/persons/person– Where
• i – show response headers• H – pass request headers to the resource• X – pass a HTTP method name• d – pass in parameters enclosed in quotes; multiple
parameters are separated by ‘&’The above command posts the first name “james” to the persons resource. Assuming the server creates a new person resource with first name of James, I also tell the server to return a json representation of the newly created resource.
Good Examples http://blogs.plexibus.com/2009/01/15/rest-esting-with-curl/
Cloud API - API Authentication
GET /v1.0 HTTP/1.1Host: auth.api.rackspacecloud.comX-Auth-User: jdoeX-Auth-Key: a86850deb2742ec3cb41518e26aa2d89
curl -i -H "X-Auth-Key: a86850deb2742ec3cb41518e26aa2d89 " -H "X-Auth-User: jdoe" https://auth.api.rackspacecloud.com/v1.0
HTTP/1.1 204 No ContentDate: Sat, 27 Feb 2010 06:28:49 GMTServer: Apache/2.2.3 (Mosso Engineering)X-Storage-Token: 6ce9397a-4164-44ba-bbd4-e1b6c9a6abc1X-Storage-Url: https://storage5.clouddrive.com/v1/MossoCloudFS_8c1e3b35-d250-4a6d-aa5a-35399b039b1dX-Server-Management-Url: https://servers.api.rackspacecloud.com/v1.0/437001X-CDN-Management-Url: https://cdn.clouddrive.com/v1/MossoCloudFS_8c1e3b35-d250-4a6d-aa5a-35399b039b1dX-Auth-Token: 6ce9397a-4164-44ba-bbd4-e1b6c9a6abc1Content-Length: 0Connection: closeContent-Type: application/octet-stream
Figure on page 7: API Authentication from Cloud Servers Developer Guide 10/15/09
Curl implementation of the above Authentication Request
Rackspace Response
Cloud API - API Version
GET HTTP/1.1Host: servers.api.rackspacecloud.com/
curl -i -H "Accept: application/xml" -H "X-Auth-Token: 6ce9397a-4164-44ba-bbd4-e1b6c9a6abc1" -X GET "https://servers.api.rackspacecloud.com/"
HTTP/1.1 200 OKServer: Apache-Coyote/1.1vary: Accept, Accept-EncodingLast-Modified: Thu, 25 Feb 2010 22:40:13 GMTContent-Type: application/xmlContent-Length: 161Date: Sat, 27 Feb 2010 05:42:06 GMTX-Varnish: 168976310Age: 0Via: 1.1 varnishConnection: close<?xml version="1.0" encoding="UTF-8" standalone="yes"?><versions xmlns="http://docs.rackspacecloud.com/servers/api"> <version status="BETA" id="v1.0"/></versions>
Figure on page 15: API Version
Cloud API - API Version
curl -i -H "Accept: application/xml" -H "X-Auth-Token: 6ce9397a-4164-44ba-bbd4-e1b6c9a6abc1" -X GET https://servers.api.rackspacecloud.com/v1.0/437001/servers/detail > apiServerListDetails.xml
Figure on page 20: List Servers
Virtual SpaceG
rid L
ayer
Augmented Reality
http://artimes.rouli.net/2009/07/cool-augmented-business-card-from-toxin.html
Cool Augmented Business Card from Toxin Labs
Social Networks
What’s Next
References
• http://www.productionscale.com/home/2009/8/2/using-curl-to-access-the-rackspace-cloud-api.html• http://blogs.plexibus.com/2009/01/15/rest-esting-with-curl/• http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm• https://manage.rackspacecloud.com/APIAccess.do• http://en.wikipedia.org/wiki/REST• http://oreilly.com/catalog/9780596529260/• http://www.oreillynet.com/pub/wlg/3005• http://15timez.blogspot.com/2010/03/virtual-world-therecom-to-close.html
I was recently talking with Jeff Barr, creator of syndic8 and now Amazon's chief web services evangelist. He let drop an interesting tidbit. Amazon has both SOAP and REST interfaces to their web services, and 85% of their usage is of the REST interface. Despite all of the corporate hype over the SOAP stack, this is pretty compelling evidence that developers like the simpler REST approach. (I know there are many more complex applications where SOAP is better, but I've always liked technologies that have low barriers to entry and grassroots adoption, and simple XML over HTTP approach seems to have that winning combination.) ….. REST vs. SOAP Tim O’Reilly Apr 03, 2003
With REST over HTTP you do not have to worry about vendor interoperability you can focus on understanding the data format of the server and application interoperability . …. Bill Burke