SlideShare a Scribd company logo
1 of 34
Download to read offline
I'll See You on

the Write Side of the Web
         WS-REST 2011



                            1
Introduction
ā€¢ Stuart Charlton (@svrc)

ā€¢ Director at Canadian Paciļ¬c Railway

ā€¢ Formerly CTO of Elastra, a cloud computing product
  based on semantic web technology

ā€¢ Weblog: Stu Says Stuff
  http://www.stucharlton.com/blog

ā€¢ Many thanks to commenters and twitterers on this
  topic

                                                       2
Theme
ā€¢ The Web Architecture has been an immense
  success...

 ā€¢ ... and yet, we can do better.

ā€¢ Thereā€™s a need to design the software for the
  write side of the web to scale and become
  nearly as serendipitous as the read side

 ā€¢ Is this even possible? Letā€™s ļ¬nd out.


                                                  3
The Read Side

ā€¢ GET                 ā€¢ Atom & RSS feeds

ā€¢ RDFa/Microformats   ā€¢ Search

ā€¢ Browsing            ā€¢ Semantic Web




                                           4
The Write Side

ā€¢ POST          ā€¢ Facebook Status

ā€¢ AtomPub       ā€¢ Media Sharing

ā€¢ Integration   ā€¢ e-Commerce




                                    5
Why?




       6
Why?


ā€¢ Growth in Centralized Services

 ā€¢ e.g. Facebook




                                   7
Why?
ā€¢ Systems Integration

 ā€¢ Custom media types are the current approach...

 ā€¢ ... but that can only be a transitory solution

 ā€¢ Many ā€œRESTfulā€ design thrashing due to lack of
   prescriptive guidance

   ā€¢ Would be reduced with more generic media
     types (e.g. as with HTML, AtomPub)
                                                    8
Why?

ā€¢ REST is not CRUD (create, read, update, delete)

 ā€¢ Neither is HTTP

 ā€¢ POST does not map directly to ā€˜createā€™

 ā€¢ CRUD leads to complexity at scale



                                                    9
Why?

ā€¢ Programming models matter

 ā€¢ In particular, the clientŹ¼s model of how it interacts
   with the server

 ā€¢ Process-driven? Or something else?

 ā€¢ Lots of innovation in this space...


                                                           10
Theses
ā€¢ The Web architectureā€™s core strength is in encouraging small
  pieces of independent agreement to be linked together and
  shared; weā€™re missing some agreements for writes

ā€¢ The Web architecture encourages clients to be designed as
  agents in a dynamic information space

ā€¢ There are practical approaches to programming agents in a
  dynamic environment

ā€¢ It should be possible to create a general purpose media
  type for systems to manipulate state on the web, in lieu of
  more speciļ¬c media types.


                                                                 11
Agreement




            12
Collaborative Systems
         Architecture
ā€¢ ā€œThe greatest leverage in system architecting is at the
  interfaces. The greatest dangers are also at the interfaces.ā€

ā€¢ ā€œWhen the components of a system are highly independent,
  operationally and managerially, the architecture of the system
  is the interfaces.ā€
  (Maier & Rechtin, The Art of Systems Architecting)


ā€¢ In Roy Speak....

ā€¢ ā€œ[RESTā€™s goals are] achieved by placing constraints on
  connector semantics where other styles have focused on
  components semantics.ā€



                                                                   13
Design for Serendipity

ā€¢ ā€œChance encountersā€

ā€¢ Media types, link relations,
  RDFa/microformats, URI templates,
  well-known URIs, host meta, etc.




                                      14
What agreements could be helpful?

 ā€¢ Link relations for POST resources

 ā€¢ The effects of a POST

  ā€¢ cache invalidation

  ā€¢ pre/post conditions

 ā€¢ The contents of a POST

  ā€¢ e.g. RDF Forms


                                       15
Programming




              16
Client/Server Programming

         Invoke                Remote
                              Procedure


                               Create
      Application                          Request
       Logic &                             Message
      Exception                             Format
       Handling              New Message                Handler




                                                        (optional)
                               Handler
                                                      New Message
                                           Response
                                           Message
                                            Format


                    Client                               Server




                                                                     17
REST Raises the Level of Abstraction


ā€¢ The message vs. the resource/representation

ā€¢ Traditional Client/Server:
  Client is a program sending/receiving messages

ā€¢ REST:
  Client is an agent acting in an information space




                                                      18
Hypermedia Programming
                               Cached                            HTTP GET
                            Representations      Sensors                      Resource


        Goals &                                 State of the
      Preferences                             application now                 Resource


                                                                              Resource
                     Representation
                         Logic

  Modify                                         Choose                       Resource
                    e.g. Link relations,
  Goals                                        Desired State
                        Media type
                      speciļ¬cations,
                    pre/post conditions



       Exception                              Transfer Desired
       Handlers                                    State
                           Runtime Events

                                                 Effectors                    Resource
                                                                 HTTP POST

                                                                             Environment
                          Hypermedia Agent                                    (The Web)


                                                                                           19
Qualities of the Client
ā€¢ Goal-Directed

ā€¢ Reactive

ā€¢ Hypermedia workspace
  (cached representations)

ā€¢ Sensing can be done to pick up on effects



                                              20
Agents




         21
Agent
ā€¢ Traditional agents are distinguished from
  mere programs via...

 ā€¢ The existence of an environment it needs
   to react to

 ā€¢ The autonomy for the agent to make
   detailed decisions for the user so long as it
   is seeking to achieve a goal


                                                   22
The AI approach to Agents

ā€¢ Automated Planning

  ā€¢ A process to determine an order of actions to be
    taken in pursuit of a goal

Current state of the world
Description of actions       Planner   Required actions (plan)
Goals and constraints



                                                                 23
Example of Planning

                                                          Download package list
                            Install Z
       Download X
                                     Upgrade Z
                      Install X
                                                 Download Y           Download X
        Download Z
                                     Upgrade X
         Download package list                    Install Y
Download Y
                Install X         Install Y


             Upgrade Y                                        Install X




                                                          Plan
      Set of all available actions                   (selected and
                                                    ordered actions)




                                                                                   24
Step 1                  Step 2          Step n          Result
                                                                 15 /32



     An Alternative Approach
ā€¢ Subsumption Architecture;
  aka. Hierarchical State Machines
                   Development by subsumption

     Situation n                                              STAGE n     !"
         ā€¦ā€¦ā€¦




                                                               ā€¦
                                                                               SYSTEM

     Situation 2                              STAGE 2    !"   STAGE 2     !"




     Situation 1              STAGE 1    !"   STAGE 1    !"    STAGE 1
                                                                          !"



                   0   time
                               Step 1          Step 2    ā€¦     Step n           Result
                                                                                 15 /32




                                                                                          25
Programming by
        Difference
ā€¢ Coined by Miro Samek

ā€¢ State nesting lets you deļ¬ne a new state
  rapidly in terms of an old one, by reusing
  semantics from the parent

ā€¢ Reuse what is common, override what is not




                                               26
States in the Halo 2 Game Engine




                                   27
Agreements as a State Sandwich


               Application State Machine!



          Hypermedia Application State Machine!


                   HTTP State Machine!


             Media State Machine!
                                    ...!




                                                  28
Media Type




             29
Mapping Nested State Transitions
        to Restbucks




                                   30
State Chart XML
ā€¢ Promising W3C Draft; Hierarchical FSMs; JavaScript Code-on-Demand,
  Expressions (Pre/Post Conditions), Event Model

ā€¢ Weaknesses: Lacks Hyperlinks, Mandates Heavyweight Message Format
  <state id="S" initial="s1">
     <state id="s1" initial="s11">
        <onexit>
           <log expr="'leaving s1'"/>
       </onexit>

       <state id="s11">
          <onexit>
             <log expr="'leaving s11'"/>
          </onexit>
       </state>

       <transition event="e" target="s21">
           <log expr="'executing transition'"/>
       </transition>
     </state>
  </state>




                                                                       31
Possible Characteristics

ā€¢ JSON-based (and/or JS code on demand)

ā€¢ Link relations for states, events, and
  transitions

ā€¢ Events become identiļ¬able elements of some
  representations




                                               32
Behave: A JavaScript
State-Aware User Agent

ā€¢ Implemented in node.js

ā€¢ JSON-based linked state machines

ā€¢ First release in May 2011




                                     33
Revisiting the Theses
ā€¢ Agreements: The effects of a POST in context to other
  representations

ā€¢ Programming: Instead of a RESTful client library, aim for
  an agent runtime

ā€¢ Agents: Hierarchical state machines are promising
  today; hierarchical planning with sensing is a promising
  thread for research

ā€¢ Media Type: Link relations for states and their transitions;
  the ability to nest states & transitions via hyperlinks


                                                                 34

More Related Content

Viewers also liked

6 Months Project Training in PHP
6 Months Project Training in PHP6 Months Project Training in PHP
6 Months Project Training in PHPTech Mentro
Ā 
Nanobiomed 2011 Sabatier Mangematin Public
Nanobiomed 2011 Sabatier Mangematin PublicNanobiomed 2011 Sabatier Mangematin Public
Nanobiomed 2011 Sabatier Mangematin Publicvalerie_sabatier
Ā 
What Writers Donā€™t Know About Translation Can Be Costly
What Writers Donā€™t Know About Translation Can Be CostlyWhat Writers Donā€™t Know About Translation Can Be Costly
What Writers Donā€™t Know About Translation Can Be CostlySTC-Philadelphia Metro Chapter
Ā 
MoP quick guide
MoP quick guide MoP quick guide
MoP quick guide Maven
Ā 
Currency book
Currency bookCurrency book
Currency bookPilar Lalana
Ā 
Wpływ synergii działań SEO/PPC i email marketingu na przychody w sklepie inte...
Wpływ synergii działań SEO/PPC i email marketingu na przychody w sklepie inte...Wpływ synergii działań SEO/PPC i email marketingu na przychody w sklepie inte...
Wpływ synergii działań SEO/PPC i email marketingu na przychody w sklepie inte...SEOgroup
Ā 
Sample of product development
Sample of product developmentSample of product development
Sample of product developmentTransit-Protect
Ā 
Sandton Post Zomer 2011
Sandton Post Zomer 2011Sandton Post Zomer 2011
Sandton Post Zomer 2011Jaap van den Berg
Ā 
Moving Beyond Help: Transforming Yourself into Writing Corporate Strategy
Moving Beyond Help: Transforming Yourself into Writing Corporate StrategyMoving Beyond Help: Transforming Yourself into Writing Corporate Strategy
Moving Beyond Help: Transforming Yourself into Writing Corporate StrategySTC-Philadelphia Metro Chapter
Ā 
Personas: Designing Engaging Content for Customer Intimacy
Personas: Designing Engaging Content for Customer IntimacyPersonas: Designing Engaging Content for Customer Intimacy
Personas: Designing Engaging Content for Customer IntimacySTC-Philadelphia Metro Chapter
Ā 
11źø°ķšb ģ“ģž¬ģš© ė‚“ź°€ ź°€ģž„ ź³µė“¤ģø ģŗė¦­ķ„°
11źø°ķšb ģ“ģž¬ģš© ė‚“ź°€ ź°€ģž„ ź³µė“¤ģø ģŗė¦­ķ„°11źø°ķšb ģ“ģž¬ģš© ė‚“ź°€ ź°€ģž„ ź³µė“¤ģø ģŗė¦­ķ„°
11źø°ķšb ģ“ģž¬ģš© ė‚“ź°€ ź°€ģž„ ź³µė“¤ģø ģŗė¦­ķ„°qwee998
Ā 
Using Social Media to Automate Information for Reuse and Repurpose
Using Social Media to Automate Information for Reuse and RepurposeUsing Social Media to Automate Information for Reuse and Repurpose
Using Social Media to Automate Information for Reuse and RepurposeSTC-Philadelphia Metro Chapter
Ā 
02k activeand passivevoiceoffice2003-1
02k activeand passivevoiceoffice2003-102k activeand passivevoiceoffice2003-1
02k activeand passivevoiceoffice2003-1JANA CIOBANU
Ā 
APIs and SDKs: Breaking into and Succeeding in a Specialty Market
APIs and SDKs: Breaking into and Succeeding in a Specialty MarketAPIs and SDKs: Breaking into and Succeeding in a Specialty Market
APIs and SDKs: Breaking into and Succeeding in a Specialty MarketSTC-Philadelphia Metro Chapter
Ā 
Banff Gondola Brochure Reading Skill Building
Banff Gondola Brochure Reading Skill BuildingBanff Gondola Brochure Reading Skill Building
Banff Gondola Brochure Reading Skill BuildingJANA CIOBANU
Ā 

Viewers also liked (20)

6 Months Project Training in PHP
6 Months Project Training in PHP6 Months Project Training in PHP
6 Months Project Training in PHP
Ā 
Nanobiomed 2011 Sabatier Mangematin Public
Nanobiomed 2011 Sabatier Mangematin PublicNanobiomed 2011 Sabatier Mangematin Public
Nanobiomed 2011 Sabatier Mangematin Public
Ā 
What Writers Donā€™t Know About Translation Can Be Costly
What Writers Donā€™t Know About Translation Can Be CostlyWhat Writers Donā€™t Know About Translation Can Be Costly
What Writers Donā€™t Know About Translation Can Be Costly
Ā 
MoP quick guide
MoP quick guide MoP quick guide
MoP quick guide
Ā 
Currency book
Currency bookCurrency book
Currency book
Ā 
Wpływ synergii działań SEO/PPC i email marketingu na przychody w sklepie inte...
Wpływ synergii działań SEO/PPC i email marketingu na przychody w sklepie inte...Wpływ synergii działań SEO/PPC i email marketingu na przychody w sklepie inte...
Wpływ synergii działań SEO/PPC i email marketingu na przychody w sklepie inte...
Ā 
Inicio unidad narrativa
Inicio unidad narrativaInicio unidad narrativa
Inicio unidad narrativa
Ā 
Sample of product development
Sample of product developmentSample of product development
Sample of product development
Ā 
Sandton Post Zomer 2011
Sandton Post Zomer 2011Sandton Post Zomer 2011
Sandton Post Zomer 2011
Ā 
Moving Beyond Help: Transforming Yourself into Writing Corporate Strategy
Moving Beyond Help: Transforming Yourself into Writing Corporate StrategyMoving Beyond Help: Transforming Yourself into Writing Corporate Strategy
Moving Beyond Help: Transforming Yourself into Writing Corporate Strategy
Ā 
STC PMC Newsletter 2011-03
STC PMC Newsletter 2011-03STC PMC Newsletter 2011-03
STC PMC Newsletter 2011-03
Ā 
Frase maleĆÆda
Frase maleĆÆdaFrase maleĆÆda
Frase maleĆÆda
Ā 
Personas: Designing Engaging Content for Customer Intimacy
Personas: Designing Engaging Content for Customer IntimacyPersonas: Designing Engaging Content for Customer Intimacy
Personas: Designing Engaging Content for Customer Intimacy
Ā 
11źø°ķšb ģ“ģž¬ģš© ė‚“ź°€ ź°€ģž„ ź³µė“¤ģø ģŗė¦­ķ„°
11źø°ķšb ģ“ģž¬ģš© ė‚“ź°€ ź°€ģž„ ź³µė“¤ģø ģŗė¦­ķ„°11źø°ķšb ģ“ģž¬ģš© ė‚“ź°€ ź°€ģž„ ź³µė“¤ģø ģŗė¦­ķ„°
11źø°ķšb ģ“ģž¬ģš© ė‚“ź°€ ź°€ģž„ ź³µė“¤ģø ģŗė¦­ķ„°
Ā 
International Issues in Case Studies
International Issues in Case StudiesInternational Issues in Case Studies
International Issues in Case Studies
Ā 
Using Social Media to Automate Information for Reuse and Repurpose
Using Social Media to Automate Information for Reuse and RepurposeUsing Social Media to Automate Information for Reuse and Repurpose
Using Social Media to Automate Information for Reuse and Repurpose
Ā 
02k activeand passivevoiceoffice2003-1
02k activeand passivevoiceoffice2003-102k activeand passivevoiceoffice2003-1
02k activeand passivevoiceoffice2003-1
Ā 
APIs and SDKs: Breaking into and Succeeding in a Specialty Market
APIs and SDKs: Breaking into and Succeeding in a Specialty MarketAPIs and SDKs: Breaking into and Succeeding in a Specialty Market
APIs and SDKs: Breaking into and Succeeding in a Specialty Market
Ā 
Banff Gondola Brochure Reading Skill Building
Banff Gondola Brochure Reading Skill BuildingBanff Gondola Brochure Reading Skill Building
Banff Gondola Brochure Reading Skill Building
Ā 
2016 Conduit Program
2016 Conduit Program2016 Conduit Program
2016 Conduit Program
Ā 

More from ruyalarcon

Wsrest13 gilherme keynote
Wsrest13 gilherme keynoteWsrest13 gilherme keynote
Wsrest13 gilherme keynoteruyalarcon
Ā 
A Framework for Self-descriptive RESTful Services
A Framework for Self-descriptive RESTful ServicesA Framework for Self-descriptive RESTful Services
A Framework for Self-descriptive RESTful Servicesruyalarcon
Ā 
Distributed affordance: An Open-World Assumption for Hypermedia
Distributed affordance: An Open-World Assumption for HypermediaDistributed affordance: An Open-World Assumption for Hypermedia
Distributed affordance: An Open-World Assumption for Hypermediaruyalarcon
Ā 
Teaching Old Services New Tricks: Adding HATEOAS Support as an Afterthought
Teaching Old Services New Tricks: Adding HATEOAS Support as an AfterthoughtTeaching Old Services New Tricks: Adding HATEOAS Support as an Afterthought
Teaching Old Services New Tricks: Adding HATEOAS Support as an Afterthoughtruyalarcon
Ā 
Modeling RESTful applications
Modeling RESTful applicationsModeling RESTful applications
Modeling RESTful applicationsruyalarcon
Ā 
A Resource Oriented Framework for Context-Aware Enterprise Applications
A Resource Oriented Framework for Context-Aware Enterprise ApplicationsA Resource Oriented Framework for Context-Aware Enterprise Applications
A Resource Oriented Framework for Context-Aware Enterprise Applicationsruyalarcon
Ā 
XML Technologies for RESTful Services Development
XML Technologies for RESTful Services DevelopmentXML Technologies for RESTful Services Development
XML Technologies for RESTful Services Developmentruyalarcon
Ā 
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, TooRestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Tooruyalarcon
Ā 
Hecate, Managing Authorization with RESTful XML
Hecate, Managing Authorization with RESTful XMLHecate, Managing Authorization with RESTful XML
Hecate, Managing Authorization with RESTful XMLruyalarcon
Ā 
A Framework for Obligation Fulfillment in REST Services
A Framework for Obligation Fulfillment in REST ServicesA Framework for Obligation Fulfillment in REST Services
A Framework for Obligation Fulfillment in REST Servicesruyalarcon
Ā 
REST and Linked Data: a match made for domain driven development?
REST and Linked Data: a match made for domain driven development?REST and Linked Data: a match made for domain driven development?
REST and Linked Data: a match made for domain driven development?ruyalarcon
Ā 
S1 intro
S1 introS1 intro
S1 introruyalarcon
Ā 
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...ruyalarcon
Ā 

More from ruyalarcon (13)

Wsrest13 gilherme keynote
Wsrest13 gilherme keynoteWsrest13 gilherme keynote
Wsrest13 gilherme keynote
Ā 
A Framework for Self-descriptive RESTful Services
A Framework for Self-descriptive RESTful ServicesA Framework for Self-descriptive RESTful Services
A Framework for Self-descriptive RESTful Services
Ā 
Distributed affordance: An Open-World Assumption for Hypermedia
Distributed affordance: An Open-World Assumption for HypermediaDistributed affordance: An Open-World Assumption for Hypermedia
Distributed affordance: An Open-World Assumption for Hypermedia
Ā 
Teaching Old Services New Tricks: Adding HATEOAS Support as an Afterthought
Teaching Old Services New Tricks: Adding HATEOAS Support as an AfterthoughtTeaching Old Services New Tricks: Adding HATEOAS Support as an Afterthought
Teaching Old Services New Tricks: Adding HATEOAS Support as an Afterthought
Ā 
Modeling RESTful applications
Modeling RESTful applicationsModeling RESTful applications
Modeling RESTful applications
Ā 
A Resource Oriented Framework for Context-Aware Enterprise Applications
A Resource Oriented Framework for Context-Aware Enterprise ApplicationsA Resource Oriented Framework for Context-Aware Enterprise Applications
A Resource Oriented Framework for Context-Aware Enterprise Applications
Ā 
XML Technologies for RESTful Services Development
XML Technologies for RESTful Services DevelopmentXML Technologies for RESTful Services Development
XML Technologies for RESTful Services Development
Ā 
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, TooRestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
Ā 
Hecate, Managing Authorization with RESTful XML
Hecate, Managing Authorization with RESTful XMLHecate, Managing Authorization with RESTful XML
Hecate, Managing Authorization with RESTful XML
Ā 
A Framework for Obligation Fulfillment in REST Services
A Framework for Obligation Fulfillment in REST ServicesA Framework for Obligation Fulfillment in REST Services
A Framework for Obligation Fulfillment in REST Services
Ā 
REST and Linked Data: a match made for domain driven development?
REST and Linked Data: a match made for domain driven development?REST and Linked Data: a match made for domain driven development?
REST and Linked Data: a match made for domain driven development?
Ā 
S1 intro
S1 introS1 intro
S1 intro
Ā 
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Ā 

Recently uploaded

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
Ā 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
Ā 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
Ā 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
Ā 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
Ā 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
Ā 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
Ā 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
Ā 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
Ā 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
Ā 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
Ā 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
Ā 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
Ā 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
Ā 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
Ā 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
Ā 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
Ā 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
Ā 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
Ā 

Recently uploaded (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
Ā 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Ā 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Ā 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
Ā 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Ā 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Ā 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Ā 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
Ā 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Ā 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Ā 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Ā 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Ā 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Ā 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
Ā 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Ā 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
Ā 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Ā 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Ā 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Ā 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Ā 

I'll See You on the Write Side of the Web

  • 1. I'll See You on the Write Side of the Web WS-REST 2011 1
  • 2. Introduction ā€¢ Stuart Charlton (@svrc) ā€¢ Director at Canadian Paciļ¬c Railway ā€¢ Formerly CTO of Elastra, a cloud computing product based on semantic web technology ā€¢ Weblog: Stu Says Stuff http://www.stucharlton.com/blog ā€¢ Many thanks to commenters and twitterers on this topic 2
  • 3. Theme ā€¢ The Web Architecture has been an immense success... ā€¢ ... and yet, we can do better. ā€¢ Thereā€™s a need to design the software for the write side of the web to scale and become nearly as serendipitous as the read side ā€¢ Is this even possible? Letā€™s ļ¬nd out. 3
  • 4. The Read Side ā€¢ GET ā€¢ Atom & RSS feeds ā€¢ RDFa/Microformats ā€¢ Search ā€¢ Browsing ā€¢ Semantic Web 4
  • 5. The Write Side ā€¢ POST ā€¢ Facebook Status ā€¢ AtomPub ā€¢ Media Sharing ā€¢ Integration ā€¢ e-Commerce 5
  • 6. Why? 6
  • 7. Why? ā€¢ Growth in Centralized Services ā€¢ e.g. Facebook 7
  • 8. Why? ā€¢ Systems Integration ā€¢ Custom media types are the current approach... ā€¢ ... but that can only be a transitory solution ā€¢ Many ā€œRESTfulā€ design thrashing due to lack of prescriptive guidance ā€¢ Would be reduced with more generic media types (e.g. as with HTML, AtomPub) 8
  • 9. Why? ā€¢ REST is not CRUD (create, read, update, delete) ā€¢ Neither is HTTP ā€¢ POST does not map directly to ā€˜createā€™ ā€¢ CRUD leads to complexity at scale 9
  • 10. Why? ā€¢ Programming models matter ā€¢ In particular, the clientŹ¼s model of how it interacts with the server ā€¢ Process-driven? Or something else? ā€¢ Lots of innovation in this space... 10
  • 11. Theses ā€¢ The Web architectureā€™s core strength is in encouraging small pieces of independent agreement to be linked together and shared; weā€™re missing some agreements for writes ā€¢ The Web architecture encourages clients to be designed as agents in a dynamic information space ā€¢ There are practical approaches to programming agents in a dynamic environment ā€¢ It should be possible to create a general purpose media type for systems to manipulate state on the web, in lieu of more speciļ¬c media types. 11
  • 12. Agreement 12
  • 13. Collaborative Systems Architecture ā€¢ ā€œThe greatest leverage in system architecting is at the interfaces. The greatest dangers are also at the interfaces.ā€ ā€¢ ā€œWhen the components of a system are highly independent, operationally and managerially, the architecture of the system is the interfaces.ā€ (Maier & Rechtin, The Art of Systems Architecting) ā€¢ In Roy Speak.... ā€¢ ā€œ[RESTā€™s goals are] achieved by placing constraints on connector semantics where other styles have focused on components semantics.ā€ 13
  • 14. Design for Serendipity ā€¢ ā€œChance encountersā€ ā€¢ Media types, link relations, RDFa/microformats, URI templates, well-known URIs, host meta, etc. 14
  • 15. What agreements could be helpful? ā€¢ Link relations for POST resources ā€¢ The effects of a POST ā€¢ cache invalidation ā€¢ pre/post conditions ā€¢ The contents of a POST ā€¢ e.g. RDF Forms 15
  • 17. Client/Server Programming Invoke Remote Procedure Create Application Request Logic & Message Exception Format Handling New Message Handler (optional) Handler New Message Response Message Format Client Server 17
  • 18. REST Raises the Level of Abstraction ā€¢ The message vs. the resource/representation ā€¢ Traditional Client/Server: Client is a program sending/receiving messages ā€¢ REST: Client is an agent acting in an information space 18
  • 19. Hypermedia Programming Cached HTTP GET Representations Sensors Resource Goals & State of the Preferences application now Resource Resource Representation Logic Modify Choose Resource e.g. Link relations, Goals Desired State Media type speciļ¬cations, pre/post conditions Exception Transfer Desired Handlers State Runtime Events Effectors Resource HTTP POST Environment Hypermedia Agent (The Web) 19
  • 20. Qualities of the Client ā€¢ Goal-Directed ā€¢ Reactive ā€¢ Hypermedia workspace (cached representations) ā€¢ Sensing can be done to pick up on effects 20
  • 21. Agents 21
  • 22. Agent ā€¢ Traditional agents are distinguished from mere programs via... ā€¢ The existence of an environment it needs to react to ā€¢ The autonomy for the agent to make detailed decisions for the user so long as it is seeking to achieve a goal 22
  • 23. The AI approach to Agents ā€¢ Automated Planning ā€¢ A process to determine an order of actions to be taken in pursuit of a goal Current state of the world Description of actions Planner Required actions (plan) Goals and constraints 23
  • 24. Example of Planning Download package list Install Z Download X Upgrade Z Install X Download Y Download X Download Z Upgrade X Download package list Install Y Download Y Install X Install Y Upgrade Y Install X Plan Set of all available actions (selected and ordered actions) 24
  • 25. Step 1 Step 2 Step n Result 15 /32 An Alternative Approach ā€¢ Subsumption Architecture; aka. Hierarchical State Machines Development by subsumption Situation n STAGE n !" ā€¦ā€¦ā€¦ ā€¦ SYSTEM Situation 2 STAGE 2 !" STAGE 2 !" Situation 1 STAGE 1 !" STAGE 1 !" STAGE 1 !" 0 time Step 1 Step 2 ā€¦ Step n Result 15 /32 25
  • 26. Programming by Difference ā€¢ Coined by Miro Samek ā€¢ State nesting lets you deļ¬ne a new state rapidly in terms of an old one, by reusing semantics from the parent ā€¢ Reuse what is common, override what is not 26
  • 27. States in the Halo 2 Game Engine 27
  • 28. Agreements as a State Sandwich Application State Machine! Hypermedia Application State Machine! HTTP State Machine! Media State Machine! ...! 28
  • 30. Mapping Nested State Transitions to Restbucks 30
  • 31. State Chart XML ā€¢ Promising W3C Draft; Hierarchical FSMs; JavaScript Code-on-Demand, Expressions (Pre/Post Conditions), Event Model ā€¢ Weaknesses: Lacks Hyperlinks, Mandates Heavyweight Message Format <state id="S" initial="s1"> <state id="s1" initial="s11"> <onexit> <log expr="'leaving s1'"/> </onexit> <state id="s11"> <onexit> <log expr="'leaving s11'"/> </onexit> </state> <transition event="e" target="s21"> <log expr="'executing transition'"/> </transition> </state> </state> 31
  • 32. Possible Characteristics ā€¢ JSON-based (and/or JS code on demand) ā€¢ Link relations for states, events, and transitions ā€¢ Events become identiļ¬able elements of some representations 32
  • 33. Behave: A JavaScript State-Aware User Agent ā€¢ Implemented in node.js ā€¢ JSON-based linked state machines ā€¢ First release in May 2011 33
  • 34. Revisiting the Theses ā€¢ Agreements: The effects of a POST in context to other representations ā€¢ Programming: Instead of a RESTful client library, aim for an agent runtime ā€¢ Agents: Hierarchical state machines are promising today; hierarchical planning with sensing is a promising thread for research ā€¢ Media Type: Link relations for states and their transitions; the ability to nest states & transitions via hyperlinks 34