A centre of expertise in digital information management UKOLN is supported by: SRU: An overview of the SRU protocol and how it can be used to facilitate Web Service-based search Monica Duke (Software Developer) The British Library, 2 nd June 2009
A centre of expertise in digital information management SRU: in a nutshell Web Service for Search and Retrieval Search protocol –Client sends message –Server processes message, sends response –Query language Syntax for query parameters
A centre of expertise in digital information management History Derived from Z39.50 Brought over most useful bits, in simplified format Lower implementation barrier
A centre of expertise in digital information management SRU Timeline Version 1.0 (experimental) Nov 2002 Version 1.1 (stable) Feb 2004 Version 1.2 (latest) 2006/7 1.2 –Organizational Changes (rebranding) –Technical Changes Standardization sought 2007
A centre of expertise in digital information management Standardization –Both Industry and Academia participate –Neutral ground for merging competing de facto standards Process –Open Discussion –Formation of OASIS Technical Committee –Discussion, Ballot –Leading to SRU 2.0 –
A centre of expertise in digital information management What is a Web Service? Facilitates communication to a networked application – Client requests something – Server carries out the request and reports success or failure – Responses and requests (sometimes) are encoded in XML Programmers embed calls to a web service as a part of a useful local application – Query a online database – Receive news updates – Receive stock quotations
A centre of expertise in digital information management What is REST? REpresentational State Transfer – A design philosophy not a protocol – The fundamental concept behind the web – Each URL/URI is a unique state transferred from server to client Characteristics of REST-ful web services: – Always over HTTP – Request: Form a URL + query string – Response: Comes back in XML
A centre of expertise in digital information management REST vs SOAP/XML-RPC Eric Lease Morgan classifies web services: SOAP-ful Web Services – More complicated; but potentially more robust than REST – Can use any sort of transport mechanism, ; SSH, telnet – Encoded using the SOAP XML wrapper – W3C standard for web services – Example – The Google API (incorporate Googles search results into your own program) REST-ful Web Services – Serve up as arbitrary application defined XML only – Transported via HTTP requests only
A centre of expertise in digital information management SRU: SOAP and REST SOAP-ful version: SRW Search defined using XML More complex parameters possible REST-ful version: SRU Since 1.2, both rebranded as SRU to reflect actual usage SRW SRU via SOAP
A centre of expertise in digital information management Basic SRU server Understands queries written in CQL (Common Query Language) Queries sent to an SRU server as a URL parameter Receive a structured XML response with search results Take this Result and… Format it for your users using XSLT More processing- do something else with it
A centre of expertise in digital information management SRU: Three Basic Operations Explain (please describe yourself) Search/Retrieve (search, sort, fetch) Scan (browse)
A centre of expertise in digital information management SRU search parameters Base URL: identifies the service Parameters: Query recordSchema maximumRecords startRecord
A centre of expertise in digital information management Example search retrieve operation=searchRetrieve& query=dog& version=1.2
A centre of expertise in digital information management Example response info:srw/schema/1/dc-v1.1 xml The bottom dog (next record….)
A centre of expertise in digital information management XSLT for formatting Send an xslt parameter Response is processed Results are presented in diferent formats
SRU in Use: OAI OAI Harvesters OAI Data Providers SRU Server Make Data Available Harvest and Maintain Updated Indexes of Data Search and Present Data to Users
SRU in Use: European Library
A centre of expertise in digital information management Competing standards OpenSearch/A9 part of the OASIS standardization Simpler keyword searching OpenURL
A centre of expertise in digital information management Why choose SRU? Part of the standardization process in OASIS Allows control over query and results Library community Open questions –Will standardization influence uptake? –Will other approaches join the effort?
A centre of expertise in digital information management Repositories and SRU Individually? Through aggregation…
A centre of expertise in digital information management Where to find out more Official page – Mailing List (Implementor's ListServ) Bibliography – /bibliography.htmlhttp:// /bibliography.html –Introduction, SRU and OAI, SRU and The European Library
A centre of expertise in digital information management Acknowledgements Rob Sanderson Kevin Reiss (2005) A Rest-ful Web Services Approach to Library Federated Search using SRU