Service-driven content delivery : - PowerPoint PPT Presentation

About This Presentation
Title:

Service-driven content delivery :

Description:

Servicedriven content delivery : – PowerPoint PPT presentation

Number of Views:16
Avg rating:3.0/5.0
Slides: 32
Provided by: hpcus985
Category:

less

Transcript and Presenter's Notes

Title: Service-driven content delivery :


1
Service-driven content delivery
  • Do more for your patrons through Web services

Marshall Breeding Director for Innovative
Technology and Research Vanderbilt
University http//staffweb.library.vanderbilt.edu/
breeding
2
Service Oriented Architecture
  • Increasingly becoming the preferred architecture
    and framework for Web programming
  • A key supporting technology for Web 2.0
  • Infrastructure for behind-the-scenes
    communication among applications.
  • Data exchange, conversions, lookups, etc.
  • Appropriate for portal integration, e-commerce,
    distributed applications.

3
SOA Architecture diagram
  • http//www.w3.org/TR/2002/WD-ws-arch-20021114/

4
Web services communication Path
5
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

6
Roles
  • Service provider
  • Technically more challenging
  • Service Requestor
  • Simple to implement

7
Adoption of Web services
  • Widespread use in many industries
  • Mainstream programming approach
  • Basis for Microsoft .NET technologies
  • SOAP support available for all common Web
    programming environments
  • Perl SOAPLite

8
SAO Architecture Components
9
WDSL Web Service Description Language
  • The definition, expressed in XML, of how the Web
    service operates and the data structures involved

10
SOAP Simple Object Access Protocol
  • A transport and encapsulation protocol
  • The envelope that carries the messages involved
    in an XML Web service
  • Similar to RPC (Remote procedure calls)

11
UDDI Universal Description, Discovery and
Integration
  • A directory architecture that describes the
    services available
  • Provides an automated mechanism for an
    application to know where to go to find a web
    service.
  • Web service implementations

12
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.

13
Web Service implementation methods
  • REST
  • Representational State Transfer
  • Easier, more common approach
  • SOAP
  • Used in more complex environments
  • Requires more set-up and infrastructure

14
Rest-like Example Google search
  • http//www.google.com/search?
  • qmarshallbreeding
  • hlen
  • safeoff

15
RSS as an example of REST
  • http//www.librarytechnology.org/rss

16
REST Example SRU
  • http//law-library2.rutgers.edu/SRU/srucql.pl?
  • query"NewJersey"
  • startRecord1
  • maximumRecords10
  • collectionlawlib
  • version1.1
  • operationsearchRetrieve
  • recordSchemadc

17
Example Google API
  • http//api.google.com/GoogleSearch.wsdl
  • http//www.google.com/apis/reference.html
  • Perl example for implementing the Google Web
    services

18
Example
  • print "Top library automation sites according to
    Google" if key is not provided,
    GoogleSearchService looks in ENVHOME, or in
    the location of GoogleSearchService.pm for
    googlekey.txtmy key your google API goes
    here'my google new GoogleSearch()my
    returnuse GoogleSearchmy search 'Library
    Technology'return google-gt
  • doGoogleSearch(query gt search,start gt
    0,maxResults gt 10,restrict gt
    'xml',)-gtresult()foreach my entry
    (_at_return-gt'resultElements') print
    "" print "lta href\" entry-gtURL\"gtentry-gtti
    tle\n" print "entry-gtsnippet\n" print
    "\n"

19
Mashups
  • A new resource based on content or services from
    multiple sources
  • Usually created through Web services
  • Many examples

20
Lets Build a mashup using Web Services
21
(No Transcript)
22
(No Transcript)
23
(No Transcript)
24
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

25
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)
    _at__
  • print "ltinput type\"button\"
  • value\"view street map\"
  • onclick\"newWindow(
  • \'lwc-viewmap.pl
  • sessionstringamp
  • addressStreetAddress
  • libraryLibrary
  • libphotolibphoto
  • \',\'window2\')\" buttonstyle /gt\n"

26
Step 2. Turn address into Geocode data
  • my d get(
  • http//rpc.geocoder.us/service/rest?addressfield
    s'address'
  • ) d /geolonggt(lt ).?geolatgt(lt
    )/is lat 2

27
Step 3. Invoke Google MAP API
  • Use pre-established API key
  • Fetch the correct map specifying size and
    location
  • Place the marker on the map
  • Label the marker
  • Create and populate info window

28
Call the subroutine
  • MapScript("lat","long","fields'libphoto'")

29
Invoke the subroutine
  • sub MapScript
  • local(lat,long,photo) _at__
  • local libphototext ""
  • libphototext " \"ltbr /gtltimg
    src\\\"imageserver//\" libphoto \".jpg\\\"
    height \\\"100\\\"gt\"" if (length(photo) gt 0)
  • print "ltscript type\"text/javascript\"gt\n"
  • print " //lt!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(\"lts
    tronggt\" name \"lt/stronggtltbr /gt\" 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"

30
Step 4. Stir, bake and serve
31
Comments Questions and Discussion
Write a Comment
User Comments (0)
About PowerShow.com