17
REST or SOAP Which style of Service is “best” for building the Web of Science? Duncan Hull Web Services Workshop 2007-

Web of Science: REST or SOAP?

Embed Size (px)

DESCRIPTION

Short presentation on Web services in Science, comparing two different techniques... REST and SOAP

Citation preview

Page 1: Web of Science: REST or SOAP?

REST or SOAP

Which style of Service is “best” for building the Web of Science?

Duncan HullWeb Services Workshop 2007-09-20

Page 2: Web of Science: REST or SOAP?

Looks like we’ll be developing some WS-*

• What are Web Services? A vague term, but in practice it usually means either SOAP-based or HTTP-based machine-to-machine communication:

– SOAP style description

– Demonstrate simpler REST style with examples

• Introduce some pros and cons of each

• Conclusions

– What should we be doing in dbkgroup and why?

Page 3: Web of Science: REST or SOAP?

WS-* are interesting because they transform the web into…

• --Harry Halpin and Henry Thompson, University of Edinburgh “One document to bind them: combining XML, web services, and the semantic web”, Proceedings of WWW2006 conference, see http://www.nodalpoint.org/2006/05/24/dub_dub_dub_06

image above via http://lipmagazine.org

one open-ended, vast,

decentralised computer

Page 4: Web of Science: REST or SOAP?

Creating a bioinformatics nation?

--Lincoln Stein, Cold Spring Harbor LaboratoryNature 2002, 417(6885):119-20

http://view.ncbi.nlm.nih.gov/pubmed/12000935e.g. “jimome” browser at

http://jimwatsonsequence.cshl.edu/

A Web services model will allow biological data to be

fully exploited…

Page 5: Web of Science: REST or SOAP?

More than 1 600 000 job submissions were processed using Web Services during 2006,

accounting for around 30% of all jobs run at the EBI during that period.

--Alberto Labarga et al in Nucleic Acids ResearchEuropean Bioinformatics Institute (EBI), see http://www.cs.man.ac.uk/~hulld/q2007-06-28.html

Page 6: Web of Science: REST or SOAP?

If you hit the Amazon.com gateway page, the application calls more than 100 [web] services to collect data and construct the

page for you.

--Werner Vogels, Chief Technology Officer (CTO) Amazon.com, interviewed in ACM Queue, 2006 see, http://www.cs.man.ac.uk/~hulld/q2006-09-27.html

Page 7: Web of Science: REST or SOAP?

WS-heavenor WS-hell?

Users / clients

Internet or Web(Interweb)?!

http://en.wikipedia.org/wiki/Interweb

Serviceproviders:

INPUT

OUTPUT

etc…

workflow

Page 8: Web of Science: REST or SOAP?

SOAP and WSDL walkthrough

Registry WSDL / UDDI

Search / Browse

SOAP (xml) HTTPINPUT / OUTPUT

http://www.w3.org/TR/soap/

http://www.w3.org/TR/wsdl/

Ugly, heavyweight and complicated, seems like overkill?

“layers of complexity that aren’t needed”?

Page 9: Web of Science: REST or SOAP?

No matter how hard I try, I still think the WS-* stack is bloated,

opaque, and insanely complex. I think it's going to be

hard to understand, hard to implement,

hard to interoperate, and hard to secure.

--Tim Bray, Director of Web technology at Sun Microsystems Inc.,“Loyal opposition to Web Services” (2004) http://www.cs.man.ac.uk/~hulld/q2004-11-02.html

Page 10: Web of Science: REST or SOAP?

Web service goodnessThe problem is most of today's

“web services” have nothing to do with the Web....

Today's “web service” architectures reinvent or ignore every feature that

makes the Web successful.

--Leonard Richardson & Sam Ruby (IBM) “RESTful Web Services” (2007) book, see http://www.cs.man.ac.uk/~hulld/q2007-06-30.html

Page 11: Web of Science: REST or SOAP?

H.T.T.P. is just C.R.U.D…Create, Read, Update, Delete

CRUD HTTP request method

CREATE POST (create a new resource)

READ GET (Retrieve a representation of a resource)

UPDATE PUT (modify or overwrite an existing resource)

DELETE DELETE (delete an existing resource)

H.T.T.P. is K.I.S.S. too (Keep It Simple Stupid)

Page 12: Web of Science: REST or SOAP?

REST example: EBI services

OR

OR

etc.

Page 13: Web of Science: REST or SOAP?

REST style

• No SOAP, Simpler ( don’t have to use SOAP ) and “dirtier” too!

• No standard way (yet) of creating a registry of services

– though many different options exist

• XML is optional, our resources can be anything we want

• There is a lot more to REST than this, it’s an architectural style for building web applications

Page 14: Web of Science: REST or SOAP?

REST criticism

• Foolish to model everything as HTTP GET, POST, PUT and DELETE operations?

• How to do

– Atomic transactions (all actions must be completed or none)

– Reliable messaging?

– Security (HTTP Authentication leaves a lot to be desired)

• Too simple

• No toolkits for REST

– (a criticism from software vendors who want to sell you bloat-ware)

Page 15: Web of Science: REST or SOAP?

Conclusions 1: Gartner’s Hype cycle

--Eric Newcomer IONA, see http://www.cs.man.ac.uk/~hulld/q2007-04-26.html

Web services are now past the peak of inflated expectations, through the

trough of disillusionment, on the way toward mainstream adoption.

2000 2002 2004 2006 2008

You are here (probably)

SOAPWSDL

Page 16: Web of Science: REST or SOAP?

Conclusions 2: Who can you trust?

• Be wary of the opinions of people working for technology companies.

– Especially if they have long hair, beards or hats (Hull, 2007)

– …but you knew that already

• Reality of (bio- / chemo- / whatevero-) informatics on the Web is we have a legacy of both, and this will probably continue. So we need to understand and use both styles…

• myGrid Taverna handles BOTH styles and hides some of the SOAP and WSDL nastiness

– but they are difficult to sweep under the carpet

• When we’re developing NEW services, I advocate REST-style services which are simpler and probably safer for most of the things we’ll need them for

– Only use SOAP if really you have to…

– Said only a little about WHY in a 7 minute talk but…

– …can provide more details if you buy me a beer

Don’t trust ANYONE about Web Services (including me!)

Page 17: Web of Science: REST or SOAP?

Acknowledgements / References

• Thanks to everyone I robbed stuff off :

– Homer Simpson, Michael Parkin, Sam Ruby, Paul Downey, Tim Bray, Werner Vogels, Carole Goble, Stian Soiland, Tom Oinn and myGrid team, Leonard Richardson, Tim O’Reilly, Timo Hannay, Lincoln Stein, Roy Fielding, Greg Tyrelle, Harry Halpin, Henry Thompson, Hugo Haas, Roger Costello, John Cowan, Eric Newcomer, Steve Vinoski, Richard Apodaca and Douglas Kell

• These slides are also available at http://www.slideshare.net/dullhunk

• See Also:

– “REST tutorial” by Roger Costello at http://www.xfront.com/REST.htm

– “Reconciling REST and Web Services” by Hugo Haas at http://www.w3.org/2005/Talks/1115-hh-k-ecows/

– “If Web Services are the Answer, What is the Question?” by Michael Parkin http://www.archive.org/details/IfWebServicesAreTheAnswerWhatsTheQuestion

– “RESTful Web Services” by John Cowan http://home.ccil.org/~cowan/restws.pdf

• Questions?