Web Oriented Architecture (WOA) Gluecon, May 2010

Preview:

DESCRIPTION

Web Oriented Architecture. Presented at Gluecon 2010 by Aaron Fulkerson

Citation preview

Web-Oriented ArchitectureOriginally presented at Gluecon 2010

Aaron Fulkerson

@roebot

About MindTouch

• Open source company

• Strategic documentation platform

• And a new kind of ECM

• Projects oDReAM

o SGMLReader

oMindTouch Core/2010

What is WOA?

WOA in a Nutshell

REST WWWWOA ( )

*Originally coined by Nick Gall @ironick (Gartner) 2005

REST Cheat Sheet

• Representational state transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web. (source: Wikipedia)

• Principleso Everything is a RESOURCEo Every resource has a REPRESENTATIONo Every resource has a canonical NAMEo There is a finite VOCABULARY of actionso State transitions require DISCOVERY

WOA in a Nutshell

• Information is represented as Resources• Resources are identified by URIs• Resources are manipulated via HTTP• Contracts are implicit in the representation of

the resource• Interfaces are generic

REST applied to WWW

REST WOA or REST(WWW)

Resource Web Service

Representation XML, JSON, SPHP, …

Name URI

Vocabulary HTTP methods

Discovery HTML, XML, Atom, …

God Bless HTTP

• Leverage HTTP to its full potentialo Simple: verbs, headers, status codeso Scalable: every operation is self-contained

• Every browser can be a cliento Easy discoveryo Easy debugging

• Build on existing (standard) infrastructureo Proxieso Load balancers

Of Clients and Servers

• In WOA…o Services rely on other servicesoCommunicate over HTTPo Are clients of some resources and servers of

otherso Extensibility, Scalability == Interconnection

Web APIs everywhere

• APIs allow others to integrate with youo Simplifies integrationo Frees you from custom engineering for partners

• Fosters “Unexpected reuse”• Let others provide features not on your

roadmap

Most APIs are Data Island Veneer

• Closed, specific internal architecture• Only exposes use cases directly envisioned

by API designers• Only outward facing• Do not aid internal integration stories

Web APIs, WOA style

• Connect internal systems over REST serviceso Internals become generico Extensibility becomes application neutralo Location, availability and breadth of

dependencies can take advantage of HTTPo Enables internal innovation without requiring

integration work

API first!

• Don’t expose a feature after the fact via an API

• Build an API for every feature firsto Better understanding the feature by internal and

external consumersoNo blind spots of API inaccessible parts

A word about MindTouch Core/2010

Open source collaboration platform

for the enterprise and the web• Built with Mono/.NET and PHP• Runs on SLES, RHEL, Debian/Ubuntu,

Windows and even Solaris• Downloaded over 500,000 times• Used by over 15M people• MindTouch is API first!

Application Architecture

MindTouch DReAM

Host

Email

Core

Varnish

LucenePubSub

Package

PubSub

Subscriptions

Authentication Extensions Scripts

Storage

MindTouch API

http://developer.mindtouch.com/Deki/API_Reference

• Exposes capabilities of MindTouch as web services

• MindTouch web UI uses APIo Anything the web UI can do, a third party can do

• Uses REST for extensibility• Service Discoverability

o@blueprinto@about

Some links

• http://developer.mindtouch.com/en/ref/MindTouch_API (glorious)

• http://developer.mindtouch.com/@api/deki/@blueprint• http://developer.mindtouch.com/@api/deki/@about• http://developer.mindtouch.com/@api/deki/pages/3228• http://developer.mindtouch.com/User:AaronF

– {{web.xml("http://developer.mindtouch.com/@api/deki/pages/3228/contents?format=xhtml")}}

• http://developer.mozilla.org• www.Shelfari.com• www.Whorunsgov.com

Extensibility

• Web Serviceso Standalone services

• Local or remote• Only requirement: provide a REST API

o Extensions• Hosted or remote

oDekiScript Extensions• Hosted or remote• Native or script

Architectural Benefits

• 100% API coverage there’s an API for that

• Uniform programming modeloOne model to rule them all!

• Agnostic extensibilityo Any programming languageoHosted anywhere on the network

• Flexible deployment topologiesoMany sites on one machineoMany machines for one site

The DReAM REST framework

• MindTouch is built on DReAM• DReAM optimizes REST calls within

framework, by providing an in-process HTTP pipelineo Local REST calls do not hit the wireo Serialization/Deserialization only required for out

of framework callso Local Routing of bypasses DNS

WOA makes your life easier

• Simplifies extensibility, scalability• Reduces development time for new features• Reduces engineering time spent on

integration• Creates opportunity for mash-ups and other

unforeseen user stories

Thanks

Aaron Fulkerson

@roebot