myExperiment - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

myExperiment

Description:

Grid is a long haul but we're getting there! ... Dave's Tearing Test. Imagine a language... That captures the fundamental principles of REST ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 24
Provided by: david2623
Category:

less

Transcript and Presenter's Notes

Title: myExperiment


1
Towards Computational Abstractions over a RESTful
Architecture
David De Roure
2
  • Motivation
  • REST
  • An experiment in metalinguistic abstraction
  • Reflections

3
Programming distributed systems is fundamentally
difficult
Grid is a long haul but were getting there!
There have been no fundamental breakthroughs in
distributed computing
4
But but but....the Web works!
5
(No Transcript)
6
  • The World Wide Web architecture has evolved into
    a novel architectural style that I call
    'representational state transfer.' Using elements
    of the client/server, pipe-and-filter, and
    distributed objects paradigms, this style
    optimises the network transfer of representations
    of a resource.
  • A Web-based application can be viewed as a
    dynamic graph of state representations (pages)
    and the potential transitions (links) between
    states.
  • The result is an architecture that separates
    server implementation from the client's
    perception of resources, scales well with large
    numbers of clients, enables transfer of data in
    streams of unlimited size and type, supports
    intermediaries (proxies and gateways) as data
    transformation and caching components, and
    concentrates the application state within the
    user agent components

Roy Fielding
7
  • If you look at a lot of innovations in the
    computer industry, they come when something is
    simple and the barriers to experimentation are
    low, and not from big company standards-driven
    top-down initiatives.
  • Simple bottom-up stuff is a driver of the future.
    You need to figure out how to layer more
    complexity on top of that and add value to it,
    rather than present this big heavyweight solution
    that is theoretically better.

WS- vs the REST, OReilly, Amazon talk web
service standards. By Tim Anderson. Posted in
Developer, 29th April 2006 0502 GMT
8
  • REST is not RPC, RPC says, "define some methods
    that do something" whereas REST says, "define
    some resources and they will have these methods".

Paul James
9
(No Transcript)
10
  • It uses well documented, well established, well
    used technology and methodology
  • It's already here today in fact it's been here
    for the last 12 years!
  • Resource centric rather than method centric
  • Given a URI anyone already knows how to access it
  • It's not another protocol on top of another
    protocol on top of another protocol on top of...
  • The response payload can be of any format
  • Uses the inherent HTTP security model, certain
    methods to certain URIs can easily be restricted
    by firewall configuration, unlike other XML over
    HTTP messaging formats
  • REST makes sense, use what we already have it is
    the next logical extension of the web.

Paul James
11
Daves Tearing Test
Distributing adds complexity!
12
Imagine a language...
  • That captures the fundamental principles of REST
  • Hence deploys with ease and efficiency on the Web
    architecture
  • That is independent of the locations of resources
  • i.e. A program is not designed to run on one
    node, but rather it describes the behaviour of
    part of a distributed system
  • Can be programmed in or transformed into
  • i.e. Could build domain-specific languages over
    it like scientific workflows

13
(No Transcript)
14
(No Transcript)
15
(this slide is for scheme hackers only)
  • Written in continuation-passing style
  • Uses environment model
  • Simulates concurrency
  • (eval exp env k)
  • (if second third fourth)
  • (eval (second exp)
  • env
  • (lambda (v) (eval (if v (third
    exp) (fourth exp)) env k)))

16
Map resources/servers to closures
  • (define f (resource (a 10) (b 20)))
  • (map f (a b)) -gt (10 20)
  • (set! (f a) 15)
  • (f a) -gt 15

17
  • (define g (resource http//foo/bar))
  • (g 23) sends a GET request to http//foo/bar/23
  • (map myExp (34 35 36))
  • gets workflows 34 35 and 36

18
(getcomicStrip (findcomicURL
(getImageLinks (getPage
dilbertURL)) comicURLRegex)
dilbertURL)
19
Workflows
  • I can now easily write workflows in Scheme
  • (They are awfully like Taverna ones, but RESTful)
  • They are optimised by caching / memoization
  • Concurrent invocation works
  • I can generate and transform workflows easily
    using code data property

20
Oh no! Non-result!
  • The mapping of closure to resource is very
    natural and very RESTful
  • GET highly optimised
  • State changes explicit with set! corresponding to
    PUT
  • I dont really need a new language!
  • (but I did need a parallel map)

21
So can I use distributed Scheme abstractions in
Web programming?
  • pcall, fork
  • future
  • Returns a URL
  • Computation proceeds asynchronously, result
    accessed by URL
  • If GET request before available then
  • Block, temporarily unavailable, not found, ...
  • My workflow can now proceed eagerly

22
Take Homes
  • The Web Works
  • We have tried to capture the REST architectural
    style in a language abstraction
  • The mapping of REST to Scheme was natural
  • This experiment means we now need to do a lot
    more work! ? Will anyone help me?
  • Plan to use this in teaching

23
  • Contact
  • David De Roure
  • dder_at_ecs.soton.ac.uk
Write a Comment
User Comments (0)
About PowerShow.com