22
Web-Oriented Architecture Originally presented at Gluecon 2010 Aaron Fulkerson @ roebot

Web Oriented Architecture (WOA) Gluecon, May 2010

Embed Size (px)

DESCRIPTION

Web Oriented Architecture. Presented at Gluecon 2010 by Aaron Fulkerson

Citation preview

Page 1: Web Oriented Architecture (WOA) Gluecon, May 2010

Web-Oriented ArchitectureOriginally presented at Gluecon 2010

Aaron Fulkerson

@roebot

Page 2: Web Oriented Architecture (WOA) Gluecon, May 2010

About MindTouch

• Open source company

• Strategic documentation platform

• And a new kind of ECM

• Projects oDReAM

o SGMLReader

oMindTouch Core/2010

Page 3: Web Oriented Architecture (WOA) Gluecon, May 2010

What is WOA?

Page 4: Web Oriented Architecture (WOA) Gluecon, May 2010

WOA in a Nutshell

REST WWWWOA ( )

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

Page 5: Web Oriented Architecture (WOA) Gluecon, May 2010

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

Page 6: Web Oriented Architecture (WOA) Gluecon, May 2010

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

Page 7: Web Oriented Architecture (WOA) Gluecon, May 2010

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, …

Page 8: Web Oriented Architecture (WOA) Gluecon, May 2010

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

Page 9: Web Oriented Architecture (WOA) Gluecon, May 2010

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

Page 10: Web Oriented Architecture (WOA) Gluecon, May 2010

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

Page 11: Web Oriented Architecture (WOA) Gluecon, May 2010

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

Page 12: Web Oriented Architecture (WOA) Gluecon, May 2010

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

Page 13: Web Oriented Architecture (WOA) Gluecon, May 2010

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

Page 14: Web Oriented Architecture (WOA) Gluecon, May 2010

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!

Page 15: Web Oriented Architecture (WOA) Gluecon, May 2010

Application Architecture

MindTouch DReAM

Host

Email

Core

Varnish

LucenePubSub

Package

PubSub

Subscriptions

Authentication Extensions Scripts

Storage

Page 16: Web Oriented Architecture (WOA) Gluecon, May 2010

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

Page 17: Web Oriented Architecture (WOA) Gluecon, May 2010

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

Page 18: Web Oriented Architecture (WOA) Gluecon, May 2010

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

Page 19: Web Oriented Architecture (WOA) Gluecon, May 2010

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

Page 20: Web Oriented Architecture (WOA) Gluecon, May 2010

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

Page 21: Web Oriented Architecture (WOA) Gluecon, May 2010

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

Page 22: Web Oriented Architecture (WOA) Gluecon, May 2010

Thanks

Aaron Fulkerson

@roebot