Designing
Enterprise IT Systems with REST:
     A (Cloudy) Case Study




                                      Stuart Cha...
Objectives
 What enterprise problem domains does
 RESTful architecture handle well?

 Understanding Hypermedia as a primar...
About Your Presenter
 Stuart Charlton
  • Canadian,
    now in San Francisco
 Chief Architect, Elastra
  • Responsible for...
Caveats
 REST is defined in Roy Fielding’s thesis
  • Go there for truth, I’m merely a theologian
 Web architecture is an e...
A Simple Reference Architecture



                  Presentation Services (e.g. GUI)


         Business Services (e.g. T...
Web architecture helps to burst silos

                                       Web Architecture


                  Present...
Classic “Good SOA” Interfaces




   San Francisco 2008           7
The Hypermedia Alternative




   San Francisco 2008        8
Problem Domain
 A Take on “Enterprise Cloud Computing”
 • Drastically reduced lead times to provision/change
 • Visible, d...
Problem Domain
IT Services Management & Provisioning




             Element           Resource
            Management   ...
Problem Domain
Architectural & Change Considerations
                         Designs
                   (Architectural Vi...
Organizational & Geographic Distribution
     Wire Funds                                           WLS
      Web App      ...
Hyperlinked Enterprise IT Infrastructure
 The Decentralized, Declarative Data Center
                           Designs
  ...
Hypermedia Application Flow

                                           Dynamic
           Search, Feeds,                 ...
Hypermedia is a mix of data and control

     Global graph database that also describes interfaces

                      ...
What’s a Dynamic Interface?
   Interaction port that is bound at runtime
    • CORBA Dynamic Invocation Interface
    • ja...
A RESTFul Amazon EC2
                            Resource        Security
Collections    Images                           ...
Observing Application State
                               GET

                  Representations                    Serve...
A RESTFul Amazon EC2
<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?>
   <feed xmlns=quot;http://www.w3.org/2005/Ato...
Traversing a Link
                             GET

                                                 Server
Agent
        ...
A RESTful Amazon EC2: Templates
GET http://www.mycloud.com/bundles/ec2/2008/08/Small
Host: www.mycloud.com
Date: Mon, 17 N...
A RESTful Amazon EC2: Images

<Image xmlns=quot;http://exml.com/2008/09/edmlquot;>
     <name>Fedora Core 8 , x86_64, buil...
Changing Resource State

                                  GET
Agent
                                                     ...
Requesting an Instance


POST /images/ec2/FC8x86_64b3
Host: www.mycloud.com
Date: Mon, 17 Nov 2008 09:15:16 PST
Authorizat...
Receiving an Instance
HTTP/1.1 201 Created
Location: /reservations/a9311f3
Host: www.mycloud.com
Date: Mon, 17 Nov 2008 09...
How can I describe my interfaces?


 Tightly Coupled
  • XML Schema Definitions with minOccurs > 0
 Looser Coupled
  • Dyna...
What about Versioning and Provenance?

                         “Metabase”
                        Intermediary


Agent   ...
Security: Federated Identity


 Federated Identity is increasingly needed
  • Best bet, treat it as orthogonal for now
   ...
Towards the Semantic Web
 It’s not crazy, it’s just...
  • Layering logic on top of the Web (An Open-World RDBMS)
  • Enab...
Conclusions
 Hypermedia bursts traditional IT silos
  • The same technology can handle Data, Service, and Presentation
  •...
Thank You




                           Stuart Charlton
          Chief Software Architect, Elastra



  San Francisco 20...
Upcoming SlideShare
Loading in...5
×

Designing Enterprise IT Systems with REST - QCon San Francisco 2008

5,657

Published on

Stuart Charlton's session in the REST track of QCon SF 2008, exploring hypermedia design

Published in: Technology, Business
1 Comment
7 Likes
Statistics
Notes
  • Good stuff. The sample of EC2 is timely, given the interest in 'cloud', but may not go over with folks not familiar with it. Liked the tie-in with semantic, another hot topic.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
5,657
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
246
Comments
1
Likes
7
Embeds 0
No embeds

No notes for slide

Transcript of "Designing Enterprise IT Systems with REST - QCon San Francisco 2008"

  1. 1. Designing Enterprise IT Systems with REST: A (Cloudy) Case Study Stuart Charlton Chief Software Architect, Elastra San Francisco 2008
  2. 2. Objectives What enterprise problem domains does RESTful architecture handle well? Understanding Hypermedia as a primary systems abstraction Suggested capabilities of RESTful Clients • Metadata & Versioning • Semantics & Querying • Security San Francisco 2008 2
  3. 3. About Your Presenter Stuart Charlton • Canadian, now in San Francisco Chief Architect, Elastra • Responsible for technical direction & long-term product strategy In prior lives... • BEA Systems, Rogers Communications, Financial Services, global training & consulting Stu Says Stuff http://stucharlton.com/blog San Francisco 2008 3
  4. 4. Caveats REST is defined in Roy Fielding’s thesis • Go there for truth, I’m merely a theologian Web architecture is an evolving field • This is most of what I’m talking about I don’t expect everyone to agree with me • Some think actions via HTTP POST are a bad thing • I think they’re essential; “REST is not File Storage” I actually like the Semantic Web • ...and thus cannot be trusted San Francisco 2008 4
  5. 5. A Simple Reference Architecture Presentation Services (e.g. GUI) Business Services (e.g. Transactions, BPM) Data Services (e.g. DBMS, Logs, Event Streams, etc.) San Francisco 2008 5
  6. 6. Web architecture helps to burst silos Web Architecture Presentation Services (e.g. GUI) Business Services (e.g. Transactions, BPM) Data Services (e.g. DBMS, Logs, Event Streams, etc.) San Francisco 2008 6
  7. 7. Classic “Good SOA” Interfaces San Francisco 2008 7
  8. 8. The Hypermedia Alternative San Francisco 2008 8
  9. 9. Problem Domain A Take on “Enterprise Cloud Computing” • Drastically reduced lead times to provision/change • Visible, declarative designs & infrastructure Wire Funds Web App Msg Bus Acct Wire Svc Process DB San Francisco 2008 9
  10. 10. Problem Domain IT Services Management & Provisioning Element Resource Management Management Software & Hardware San Francisco 2008 10
  11. 11. Problem Domain Architectural & Change Considerations Designs (Architectural Views) Lifecycle (Birth, Growth, Failure, Recovery, Death) Element Resource Management Management Software & Hardware San Francisco 2008 11
  12. 12. Organizational & Geographic Distribution Wire Funds WLS Web App Design MQ 10.1 Msg Bus MySQL Packages Acct Tomcat Wire Svc V 5.5 Process DB Configurations ECML ECML ECML ECML Resource Pool A Resource Pool B How can you affect change? San Francisco 2008 12
  13. 13. Hyperlinked Enterprise IT Infrastructure The Decentralized, Declarative Data Center Designs (Architectural Views) Lifecycle (Birth, Growth, Failure, Recovery, Death) Web of Metadata Categories, Capabilities, Configurations & Dependencies Element Resource Management Management Software & Hardware San Francisco 2008 13
  14. 14. Hypermedia Application Flow Dynamic Search, Feeds, Interfaces etc. Graph of Bookmark Collection Information and Interfaces (optional) New or Changed Information San Francisco 2008 14
  15. 15. Hypermedia is a mix of data and control Global graph database that also describes interfaces Agent Data Out Data In Interface Process Response Codes (GET) (PUT, Out Something DELETE) (GET) (POST) Dynamic Interface San Francisco 2008 15
  16. 16. What’s a Dynamic Interface? Interaction port that is bound at runtime • CORBA Dynamic Invocation Interface • java.lang.Reflect • Capability negotiation (e.g. TELNET) Agent matches what they know to what’s available The Big Difference? Metadata over Methods • The semantics are in the context of the link <control about=”http://myrobot.com/robot/controls/wave”> <title>Wave</title> <description>This will ask your robot to wave X many times</description> <action href=”http://myrobot.com/processor”> <input rel=”waveTimes” name=”waves” type=”xsd:positiveInteger”/> </action> </control> San Francisco 2008 16
  17. 17. A RESTFul Amazon EC2 Resource Security Collections Images Credentials Bundles Groups links Linked Image Capabilites Data Description Bundle Description Run/ Dynamic Terminate Interfaces Requirements San Francisco 2008 17
  18. 18. Observing Application State GET Representations Server Agent next states Resources Current State primary & secondary Representation History San Francisco 2008 18
  19. 19. A RESTFul Amazon EC2 <?xml version=quot;1.0quot; encoding=quot;utf-8quot;?> <feed xmlns=quot;http://www.w3.org/2005/Atomquot;> <title type=quot;textquot;>Amazon EC2 Bundles</title> <entry> <title>Amazon EC2 Standard Small Instance</title> <summary>1.7 GB Memory, 1 ECU Core, 160 Gigabytes of Storage</summary> <content type=quot;application/edml+xmlquot; src=quot;http://www.mycloud.com/bundles/ec2/2008/08/Smallquot;/> <updated>2008-07-31T12:29:29Z</updated> <published>2007-12-13T08:29:29-04:00</published> </entry> <entry> <title>Amazon EC2 Standard Large Instance</title> <summary>8 GB of Memory, 2 ECU Cores, 850 GB of Storage</summary> <content type=quot;application/edml+xmlquot; src=quot;http://www.mycloud.com/bundles/ec2/2008/08/Largequot;/> <updated>2008-07-31T12:29:29Z</updated> <published>2007-12-13T08:29:29-04:00</published> </entry> </feed> San Francisco 2008 19
  20. 20. Traversing a Link GET Server Agent Current Resources State Representation next states History Cached State San Francisco 2008 20
  21. 21. A RESTful Amazon EC2: Templates GET http://www.mycloud.com/bundles/ec2/2008/08/Small Host: www.mycloud.com Date: Mon, 17 Nov 2008 09:15:16 PST Authorization: <token here> Accept: application/edml+xml HTTP/1.1 200 OK Host: www.mycloud.com Date: Mon, 17 Nov 2008 09:15:19 PST Content-Type: application/edml+xml <ResourceBundle xmlns=quot;http://exml.com/2008/09/edmlquot;> <name xml:lang=quot;enquot;>Amazon EC2 Standard Small Instance</rdfs:label> <provides> <capability href=quot;http://www.mycloud.com/platforms/ec2#SmallStoragequot; /> <capability href=quot;http://www.mycloud.com/platforms/ec2#SmallCPUquot; /> <capability href=quot;http://www.mycloud.com/platforms/ec2#SmallMemoryquot; /> </provides> </ResourceBundle> San Francisco 2008 21
  22. 22. A RESTful Amazon EC2: Images <Image xmlns=quot;http://exml.com/2008/09/edmlquot;> <name>Fedora Core 8 , x86_64, build 3</name> <provides> <capability>http://purl.org/edml/OperatingSystems/Linux</capability> <capability>http://purl.org/edml/OperatingSystems/64Bit</capability> </provides> <requires> <capability>http://purl.org/edml/ChipArchitectures/64Bit</capability </requires> <run action=quot;quot;> <bundle /> <quantity /> <groups /> <keypair /> </run> </Image> San Francisco 2008 22
  23. 23. Changing Resource State GET Agent Server Current Resources State POST links Known Do I know the intent of this? Media Do I know how to construct this? Types POST an appropriate media type San Francisco 2008 23
  24. 24. Requesting an Instance POST /images/ec2/FC8x86_64b3 Host: www.mycloud.com Date: Mon, 17 Nov 2008 09:15:16 PST Authorization: <token here> Content-Type: applicaton/edml+xml <run xmlns=quot;http://exml.com/edmlv2quot;> <bundle href=quot;http://www.mycloud.com/bundles/ec2/2008/08/Smallquot;/> <quantity>2</quantity> <groups>http://www.mycloud.com/groups/default</groups> <keypairs>http://www.mycloud.com/keypairs/stuartc-keypair</keypairs> </run> San Francisco 2008 24
  25. 25. Receiving an Instance HTTP/1.1 201 Created Location: /reservations/a9311f3 Host: www.mycloud.com Date: Mon, 17 Nov 2008 09:15:19 PST Content-Type: application/edml+xml <Reservation xmlns=quot;http://exml.com/2008/09/edmlquot;> <terminate action=quot;http://www.mycloud.com/reservations/a9311f3quot;/> <Resource> <state>launching</state> <link rel=quot;selfquot; href=quot;http://www.mycloud.com/reservations/a9311f3/1quot;/> <bundle href=quot;http://www.mycloud.com/bundles/ec2/2008/08/Smallquot;/> <image href=quot;http://www.mycloud.com/bundles/ec2/FC8x86_64b3quot;/> <terminate action=quot;http://www.mycloud.com/reservations/a9311f3/1quot;/> </Resource> <Resource> <state>launching</state> <link rel=quot;selfquot; href=quot;http://www.mycloud.com/reservations/a9311f3/2quot;/> <bundle href=quot;http://www.mycloud.com/bundles/ec2/2008/08/Smallquot;/> <image href=quot;http://www.mycloud.com/images/ec2/FC8x86_64b3quot;/> <terminate action=quot;http://www.mycloud.com/reservations/a9311f3/2quot;/> </Resource> </Reservation> San Francisco 2008 25
  26. 26. How can I describe my interfaces? Tightly Coupled • XML Schema Definitions with minOccurs > 0 Looser Coupled • Dynamically generated XML Schema Definitions • Edit Link Relations (e.g. AtomPub Media Entries) • Forms (e.g. XForms, HTML) • Annotate each field with a Persistent URI San Francisco 2008 26
  27. 27. What about Versioning and Provenance? “Metabase” Intermediary Agent Server Annotation Collections, Shredded historical Search, representations SPARQL Query San Francisco 2008 27
  28. 28. Security: Federated Identity Federated Identity is increasingly needed • Best bet, treat it as orthogonal for now SAML, (very robust in Java world) WS-Federation, (for Microsoft integration) OpenID (mind the phishing) Point-to-Point (sadly) OAuth has promise but is very young San Francisco 2008 28
  29. 29. Towards the Semantic Web It’s not crazy, it’s just... • Layering logic on top of the Web (An Open-World RDBMS) • Enabling querying and mashing of web pages without neurosurgery SPARQL is very a big win for RESTful implementers • Query databases or the web of hypermedia • Same syntax - nothing changes • Declarative integrity enforcement for PUT and POST RDFa and GRDDL are easy to use • Just annotate your HTML or write your own XSLT Semantic Web Client Library - Query the Web • http://www4.wiwiss.fu-berlin.de/bizer/ng4j/semwebclient/ San Francisco 2008 29
  30. 30. Conclusions Hypermedia bursts traditional IT silos • The same technology can handle Data, Service, and Presentation • At the expense of efficiency in some cases Hypermedia gives you ... • A global database of linked data • Human interactions embedded with the data • Dynamic Interfaces embedded with the data Dynamic interfaces are like CORBA DII or Reflection with a ProcessThis(...) method Need to look at the surrounding context Semantic web technology is practical today for early adopters • Especially GRDDL, SPARQL and RDFa San Francisco 2008 30
  31. 31. Thank You Stuart Charlton Chief Software Architect, Elastra San Francisco 2008
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×