Presentation is loading. Please wait.

Presentation is loading. Please wait.

REST Compared Mark Baker, Idokorro Mobile Inc.. REST Compared Will compare with other Distributed Object-like architectural styles i.e. chuck messages.

Similar presentations


Presentation on theme: "REST Compared Mark Baker, Idokorro Mobile Inc.. REST Compared Will compare with other Distributed Object-like architectural styles i.e. chuck messages."— Presentation transcript:

1 REST Compared Mark Baker, Idokorro Mobile Inc.

2 REST Compared Will compare with other Distributed Object-like architectural styles i.e. chuck messages at things with behaviour, state, identity OO RPC (e.g. CORBA, DCOM, RMI) Internet Tuple Spaces

3 REST Compared Comparison criteria Object identification Qualities of identification system Binding style Given an identifier, the point at which an agent knows the interface Application state engine How an application makes progress Focus on uniform interface The central feature that distinguishes the REST architectural style from other network based styles is its emphasis on a uniform interface between components – Roy Fielding, in his dissertation

4 Object Identification; OO-RPC In practice, uses OIDs/UUIDs Identifier only means something within context of system

5 Object Identification; Internet addresses for mailboxes In practice, recognizable in all contexts RFC 822 Message-Ids for messages e.g.

6 Object Identification; Tuple Spaces Typically uses local identifiers scoped to some host/port Tuples are not identified

7 Object Identification; REST URI Scheme as key innovation Provides hook for late binding Makes explicit what is implicit with other identifiers U for Uniform/Universal Enables other systems to be engulfed ftp host/path -> ftp://host/path -> Principle of Independent Invention Resources and Representations identified by URI

8 Binding Style; OO RPC To service offered by object; Early (aka static) binding I.e. Identifier is insufficient information for use To management interface; Late (aka dynamic) binding e.g. IUnknown/IDispatch, CORBA::Object

9 Binding Style; Late binding for mailboxes Via SMTP DATA method See an address, invoke DATA

10 Binding Style; Tuple Spaces Late binding See a Space, invoke in/rd/out, read/write/take, etc..

11 Binding Style; REST Late binding See a URI, invoke GET/PUT/POST/etc..

12 App State Engine; OO RPC Invoke methods Invoice.getSupplier() Sometimes get back an OID Sometimes mobile code (load(foo)).execute()

13 App State Engine; Partly hypermedia Reply to a hypermedia action Mostly ad-hoc

14 App State Engine; Tuple Space Blackboard style Template matching on read() Optional async notification of matches Tuples dont identify spaces

15 App State Engine; REST Hypermedia Walk a typed graph e.g. Supplier Each step declares possible state changes as hypermedia links

16 Lightbulbs with OO RPC Interface Lightbulb { void turnOn(); void turnOff() boolean isOn(); } Many interfaces possible

17 Lightbulbs with No reliable view of state of bulb; Inherent restriction with single, non- idempotent mutator like SMTP DATA Similar issue with Tuple Spaces …

18 Lightbulbs with Tuple Spaces Interface Lightbulb { void write( Tuple ); Tuple read( Template ); Tuple take( Template ); Handle notify( Template ); }

19 Lightbulbs with Tuple Spaces Many Bulb-to-Space mappings; Bulb state = sum(tuples) mod 2 Bulb state = num(tuples) mod 2 Bulb state = last tuple Choice determines many qualities of resulting system Can a client reliably determine the state? How easily can we recover from partial failure? This issue is common to OO RPC and

20 Lightbulbs with REST Interface Lightbulb { Representation GET(); void PUT( Representation ); void POST( Representation ); void DELETE(); }

21 Lightbulbs with REST GET() returns on, off PUT( on ) turns on, PUT( off ) turns off Only one Bulb-to-Resource mapping Partial failure, view of system state more manageable Related bulbs, or other things, can be discovered as hyperlinks via GET

22 Possible Discussion Points What about a uniform interface makes it unsuitable for machine processing (as some have suggested)? What do we need to enable this? Other Internet-scale architectural styles exist today, and will continue to do so Will Web Services be one?


Download ppt "REST Compared Mark Baker, Idokorro Mobile Inc.. REST Compared Will compare with other Distributed Object-like architectural styles i.e. chuck messages."

Similar presentations


Ads by Google