Service-driven content delivery:

54
SERVICE-DRIVEN CONTENT DELIVERY: Do more for your patrons through APIs and Web services arshall Breeding irector for Innovative Technology and Research anderbilt University ttp://www.librarytechnology.org Web Manager’s Academy Oct 24, 2010

description

Service-driven content delivery:. Marshall Breeding Director for Innovative Technology and Research Vanderbilt University http ://www.librarytechnology.org. Do more for your patrons through APIs and Web services. Oct 24, 2010. Web Manager’s Academy. General Issue. - PowerPoint PPT Presentation

Transcript of Service-driven content delivery:

SERVICE-DRIVEN CONTENT DELIVERY:Do more for your patrons through APIs and Web services

Marshall BreedingDirector for Innovative Technology and ResearchVanderbilt Universityhttp://www.librarytechnology.org

Web Manager’s AcademyOct 24, 2010

General Issue

Library websites involve many different components that deliver some aspect of content or functionality

We need ways to let systems and components communicate with each other

Construct more unified interfaces of interrelated functionality rather than send users to many separate interfaces

Addressing the problem

Working toward a more cohesive and unified Web presence for the library

Need to be able to include content or services on a Web site from external sources

Web sites need to interact with other Web sites or applications

Role of the Web site to redistribute content from a variety of resources

Library applications need to distribute content and services to other consumers beyond its direct Web presence

Disjointed approach to information and service delivery

Silos Prevail Books: Library OPAC (ILS module) Articles: Aggregated content products, e-journal

collections OpenURL linking services E-journal finding aids (Often managed by link

resolver) Subject guides (e.g. Springshare LibGuides) Local digital collections

ETDs, photos, rich media collections Metasearch engines

All searched separately

Web site as menu of search options

Lack of unified Web presence User’s don’t understand the distinctions

libraries make Web site content Search interfaces based on content formats Non-library Web sites are much more

unified

Bringing it all together

Work toward a single unified presentation layer

Interacts with multiple back-end infrastructure components

Make use of API’s and other approaches to tie many systems together

APIs: Application Programming Interfaces

A general approach that allows access to data and functionality of a software application

Computer-to-computer communications Expose services without access to source

code Proprietary or open implementations

Application based onInternal Proprietary programming

Core Functionality / Business Logic

Public Interfac

e

Staff Interfac

e

ReportsModule

Delivered Interfaces

Core Software

Data stores

Application with abstract Database API

Core Functionality / Business Logic

Public Interfac

e

Staff Interfac

e

ReportsModule

Delivered Interfaces

Core Software

Data storesRDMS API

Application with abstract Database API

Core Functionality / Business Logic

Public Interfa

ce

Staff Interfa

ce

ReportsModule

Delivered Interfaces

Core Software

Data storesRDMS API

External applicatio

ns

Application with API abstraction layer

Core Functionality / Business Logic

Application Programming Interfaces

Public Interfac

e

Staff Interfac

e

ReportsModule

Delivered Interfaces

API abstraction layer

Core Software

Data storesRDMS API

Application API exposed to External Applications

Core Functionality / Business Logic

Application Programming Interfaces

Public Interfac

e

Staff Interfa

ce

Reports

ModuleDelivered Interfaces

API abstraction layer

Core Software

Data stores

RDMS API

External applicatio

ns

Application API exposed to External Applications

Core Functionality / Business Logic

Application Programming

Interfaces

Public Interfac

e

Staff Interfa

ce

Reports

ModuleDelivered

Interfaces use proprietary programming

Core Software

Data stores

RDMS API

External applications

Web Services

An API using Web infrastructure technologies

Based on XML encoding of requests and responses

Not a Web-based service Operates behind the scenes Makes use of Web protocols

Computers need too agree on the details of the request and the response

Role of Web Services

Provides interoperability among diverse applications

Widespread use for interaction of information resources

Complex applications require information and services from multiple sources

Web services makes use of existing Web infrastructure rather than one-off proprietary protocols

XML + HTTP

Ideal for library applications

A key supporting technology for Web 2.0 Data exchange, conversions, lookups, etc. Appropriate for portal integration, e-

commerce, distributed applications. Basis for mash-ups – applications based

on content from multiple content resources

Your API / Web Services toolbox Scripting language

Ruby, PHP, Perl, Java Mid-level programming skills Knowledge of XML Documentation of source and target

applications Development environment

Display and Discovery

Enrich library content MARC record from ILS Book images from Amazon, Google Book

Search, Syntetics Table of contents Summary Ratings Tags – LibraryThing for Libraries ChiliFresh -- reviews

Service Oriented Architecture A broad framework that organizes

complex sets of Web services into larger applications

Increasingly becoming the preferred architecture and framework for Web programming and enterprise systems

SOA Architecture diagram

http://www.w3.org/TR/2002/WD-ws-arch-20021114/

Roles

Service provider Technically more challenging

Service Requestor Simple to implement

Web services communication Path

An XML oriented Architecture All the components of SOA are

expressed in XML Definition of a service Directories of services Messages involved in the operation of

the service

Adoption of Web services

Widespread use in all information and e-commerce arenas

Mainstream programming approach Use in library applications increasingly

common

FROM WEB SERVICES TO SOABuilding a new library technology infrastructure through a service-oriented architecture

Breaking down the modules

Traditional ILS Cataloging Circulation Online Catalog Acquisitions Serials control Reporting

Modern approach: SOA

Service Oriented Architecture

http://www.sun.com/products/soa/benefits.jsp

Legacy ILS + e-content modules

FederatedSearch

Circulation Acquisitions

Cataloging Serials

OpenURLLinking

Electronic Resource

MgmtSystem

Staff Interfaces:

End User Interfaces:

Data Stores:

Functionalmodules:

SOA model for business automation Underlying data repositories

Local or Global Reusable business services Composite business applications

SOA Framework from Kuali OLE

Benefits of Web services

Easy way to add e-commerce capabilities to Web site

Leverage services offered by other providers for the benefit of your users.

Web Service implementation methods REST

Representational State Transfer Easier, more common approach Most common approach in library

applications SOAP

Used in more complex environments Requires more set-up and infrastructure

Relevant APIs / Web Services Amazon Web Service Google Search Google Book Search API OCLC WorldCat APIs Local ILS APIs Facebook

Mashups

A new resource based on content or services from multiple sources

Usually created through Web services Typically involves use of a scripting

language JavaScript, Ruby, PHP, Perl, .NET Many Web sites have built-in tools for

creating mashups

What’s involved?

Some knowledge of scripting or programming languages

Application components with accessible and documented API’s

Interface design Data models Can get started with basic programming

and technical knowledge, but more can be accomplished with deeper expertise and resources.

Rest-like Example: Google search

http://www.google.com/search?q=marshall+breeding&hl=en&safe=off

RSS as an example of REST

http://www.librarytechnology.org/rss

REST Example: SRU

http://law-library2.rutgers.edu/SRU/srucql.pl?query="New+Jersey"&startRecord=1&maximumRecords=10&collection=lawlib&version=1.1&operation=searchRetrieve&recordSchema=dc

LET’S BUILD A MASHUP USING WEB SERVICES

Recipe

Ingredients Information about the library from the local

database Name, photo, street address

Latitude and Longitude from an external Web service USGS Web service

Map, positioning and display services from Google

Step 1. Launch map

Create button to launch a new window for the map Pass Library name, address and photo location:sub ViewMap { local ($Library,$StreetAddress,$libphoto) = @_; print "<input type=\"button\"

value=\"view street map\" onclick=\"newWindow(

\'lwc-viewmap.pl$sessionstring&amp;address=$StreetAddress&library=$Library&libphoto=$libphoto\',\'window2\')\" $buttonstyle />\n";

}

Step 2. Turn address into Geocode data

my $d = get(http://rpc.geocoder.us/service/rest?address=$fields{'address'}

); $d =~ /geo:long>([^< ]*).*?geo:lat>([^< ]*)/is; $lat = $2;

Step 3. Invoke Google MAP API

Use pre-established API keyFetch the correct map specifying size and

locationPlace the marker on the mapLabel the markerCreate and populate info window

Call the subroutine

&MapScript("$lat","$long","$fields{'libphoto'}");

Invoke the subroutinesub MapScript {

local($lat,$long,$photo) = @_;

local $libphototext = "";

$libphototext = "+ \"<br /><img src=\\\"$imageserver//\" + libphoto + \".jpg\\\" height = \\\"100\\\">\"" if (length($photo) > 0);

print "<script type=\"text/javascript\">\n";

print " //<![CDATA[\n";

print "\n";

print " function createMarker(point, name, address, libphoto) {\n";

print " var marker = new GMarker(point);\n";

print " GEvent.addListener(marker, \"click\", function() {\n";

print " marker.openInfoWindowHtml(\"<strong>\" + name + \"</strong><br />\" + address $libphototext);\n";

print " });\n";

print " return marker;\n";

print " }\n";

print " function load() {\n";

print " if (GBrowserIsCompatible()) {\n";

print " var map = new GMap2(document.getElementById(\"map\"));\n";

print " map.setCenter(new GLatLng($lat, $long), 15);\n";

print " var point = new GLatLng($lat,$long);\n";

print " map.addOverlay(createMarker(point,\"$fields{'library'}\",\"$fields{'address'}\",\"$fields{'libphoto'}\"));\n";

print " }\n";

print " }\n";

print "\n";

print " //]]>\n";

print " </script>\n";

}

Step 4. Stir, bake and serve

More information

Library Technology Reports Nov / Dec 2009ALA TechSource“Opening up Library Systems through Web Services and SOA: Hype or Reality?”

By Marshall Breeding

http://www.librarytechnology.org/ltg-displaytext.pl?RC=14408

Opening up Library Systems through Web Services and SOA: Hype or Reality?

This report aims to assess the current slate of major

library automation systems in regard to their

ability to provide openness through APIs, Web services, and the

adoption of SOA.

Library Technology Reports Nov/Dec Issue 2009 by Marshall Breeding

A more in-depth version:

Library Technology Reports May / June 2006ALA TechSource

“Web Services and the Service Oriented Architecture” By Marshall Breeding

http://www.librarytechnology.org/ltg-displaytext.pl?RC=12055

COMMENTS QUESTIONS AND DISCUSSION