Tuesday, August 12, 2008

RESTful Services: How XQuery and AtomPub Are About To Change Your world

Kurt Cagle - O'Reily Networks - Paper

The Rise of Restful Services
"The web is not about process". It is a giant database predicated on the idea that every address is a multifaceted thing, that never gives it true shape but only hints to those who are patient.

"How do we handle talking about everything?" Good question...I hope he answers it.

Defines resource:
  • unique
  • at least one representation
  • more attributes beyond ID
  • potential schema - maybe not a real schema but at least definable
  • provides context (defined later)
  • reachable within addressable universe
Not a resource; Mailing Address, $32.76, A Gallon of Gasoline, June 25,1963, love

Resource; web site, resume, aircraft, song, transaction, employee

In the right context they might be resources but it would be a stretch.

Representations: "The resource is the elephant, representation is what the blind men tell you about the elephant."

REST - Representional State Transfer- reflection of the state of of a given resource in a given form.
  • resource centric
  • publishing oriented verbs; Get, Put,Post,Delete
What you are dealing with is a database...you are getting things, putting things, deleting things from the web.

Groves? Doesn't define...I'll link back later when I find something online.

The importance of collections is that it is a set of related resources and a resource in and of itself. A data set is a collection.

RESTful Services:
  • URIs (Uniform Resource Identifiers) to differentiate between representations
  • only a few basic things you can do with it...Get, Put, Delete, etc
Treat the web as a database

Exploring XQuery
Data Abstraction 2010: XQuery may augement or even replace traditional server languages.

Basics of XQuery: shell around XPath 2.0 with SET manipulation, custom defined functions, modularization, schema aware...(at least in 1.1)

Basic FLOWR comparison to SQL....

XQuery Modularization: makes libraries possible, namespaced, promotes OOP-like programming (I'd like to know more about that)

<He's FLYING through the presentation...looks like he needed another 30 minutes....>

Talks about extension modules for eXist...points out that SQL can be integrated into XQuery thus making it possible to work on a SQL database from and XML database.

XQuery server language - this is coming...avoids the plumbling....consolidate multiple data streams...

The Prescription of XRX (Xquery/REST/XForms)
collapse multi-tiered data architecture

XQuery, REST,and ATOM to be a data interchange mechanism. (AtomPub) Provides a "bus" of resources for a set of links that are 'out there'. Provides a method for 'paging' blocks of content.

Closing

Slide link from the presentation.

BTW, due to the time constraints he mostly spoke the slides...so you can get a lot of the presentation from the slides.

Questions
SOA vs RESTful - there is lots of SOA that is RESTful...there isn't a fundemental difference between SOA and ROA.
Response: SOA was hijacked by the XML-RPC people. The fundamental difference is that REST treats the thing you are dealing with as a resource not a service.

Sam Hunting - Production sites to point to?
Response: See the slides

Liam Quinn - W3C
Points out list of XQuery list at W3C that shows ~50 implementations of

Alex Bolusky
eXist has an AtomPub module ("I know cause I wrote it") - eXist runs their wiki off an AtomPub so they are using it.
Response: eXist is becoming impressive for what it does. Doesn't seem as scalable as MarkLogic.

No comments: