Date post: | 28-Mar-2015 |
Category: |
Documents |
Upload: | katelyn-ortega |
View: | 213 times |
Download: | 0 times |
A centre of expertise in digital information management
www.ukoln.ac.uk
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, 2nd June 2009
A centre of expertise in digital information management
www.ukoln.ac.uk
SRU: in a nutshell
• Web Service for Search and Retrieval• Search protocol
– Client sends message
– Server processes message, sends response
– Query languageSyntax for query parameters
A centre of expertise in digital information management
www.ukoln.ac.uk
History
• Derived from Z39.50• Brought over most useful bits, in
simplified format• Lower implementation barrier
A centre of expertise in digital information management
www.ukoln.ac.uk
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
www.ukoln.ac.uk
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– http://www.dlib.org/dlib/january09/denenberg/01denenberg.html
A centre of expertise in digital information management
www.ukoln.ac.uk
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
www.ukoln.ac.uk
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
http://myrest.com/?query=cat&operation=search
– Response: Comes back in XML
A centre of expertise in digital information management
www.ukoln.ac.uk
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, email; SSH, telnet
– Encoded using the SOAP XML wrapper – W3C standard for web services
– Example – The Google API (incorporate Google’s 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
www.ukoln.ac.uk
SRU: SOAP and REST• SOAP-ful version: SRW
Search defined using XMLMore 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
www.ukoln.ac.uk
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 XSLTMore processing- do something else with it
A centre of expertise in digital information management
www.ukoln.ac.uk
SRU: Three Basic Operations
Explain (please describe yourself)
Search/Retrieve (search, sort, fetch)
Scan (browse)
A centre of expertise in digital information management
www.ukoln.ac.uk
SRU search parameters
Base URL: identifies the serviceParameters:
QueryrecordSchemamaximumRecordsstartRecord
A centre of expertise in digital information management
www.ukoln.ac.uk
Example search retrieve
http://example.org/?operation=searchRetrieve&query=dog&version=1.2
A centre of expertise in digital information management
www.ukoln.ac.uk
Example response<searchRetrieveResponse> <version>1.1</version><numberOfRecords>3</numberOfRecords> <records> <record> <recordSchema>info:srw/schema/1/dc-v1.1</recordSchema><recordPacking>xml</recordPacking> <recordData> <dc> <title>The bottom dog</title>
<identifier>http://example.org/bottom.html</identifier> </dc> </recordData>
</record> (next record….)
A centre of expertise in digital information management
www.ukoln.ac.uk
XSLT for formatting
• Send an xslt parameter• Response is processed • Results are presented in diferent
formats
SRU in Use: OAI
OAI HarvestersOAI 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
www.ukoln.ac.uk
Competing standards
• OpenSearch/A9part of the OASIS standardizationSimpler keyword searching
• OpenURL
A centre of expertise in digital information management
www.ukoln.ac.uk
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
www.ukoln.ac.uk
Repositories and SRU
• Individually?• Through aggregation…
A centre of expertise in digital information management
www.ukoln.ac.uk
Where to find out more• Official page
– http://www.loc.gov/standards/sru/
• Mailing List (Implementor's ListServ)• Bibliography
– http://www.loc.gov/standards/sru/background/bibliography.html
– Introduction, SRU and OAI, SRU and The European Library
A centre of expertise in digital information management
www.ukoln.ac.uk
Acknowledgements
• Rob Sanderson• Kevin Reiss (2005)• A Rest-ful Web Services Approach to Library Federated Search using SRU