Since its inception, the LibX browser plugin has been adopted by over 500 libraries to provide access to their services at the user's point of need. We are now developing LibX 2.0, a community platform that allows anybody to create, share, and deploy library services in a distributed and decentralized fashion. We'll describe the technology used in LibX 2.0, with a particular emphasis on the developer API and the deployment infrastructure facilitating this community engagement. -- Godmar Back, Virginia Tech
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Â
LibX 2.0
1. LibX 2 0 an Open Source,Â
2.0Â â O S
Community Platform for DeliveringÂ
y f f g
Library Services
Code4Lib 2009
Godmar Back
University Libraries and Dep. Of Computer Science
Virginia Tech
2. LibX 1.0
Toolbar and right-click context menu
â˘
Adaptive and user-configurable context menus
â˘
OpenURL support
â˘
Magic Button (Google Scholar support)
â˘
Web Localization via Embedded Cues
â˘
Autolinking
â˘
Off-campus access via EZProxy or WAM
â˘
Support for CiteULike
â˘
Support for COinS
â˘
Support for xISBN
â˘
Show/Hide Hotkey
â˘
2/26/2009 Code4Lib 2009 2
3. LibX 1.0
Toolbar and right-click context menu
â˘
Adaptive and user-configurable context menus
â˘
OpenURL support
â˘
Magic Button (Google Scholar support)
â˘
Web Localization via Embedded Cues
â˘
Autolinking
â˘
Off-campus access via EZProxy or WAM
â˘
Support for CiteULike
â˘
Support for COinS
â˘
Support for xISBN
â˘
Show/Hide Hotkey
â˘
2/26/2009 Code4Lib 2009 3
4. The LibX Edition Builder
The LibX Edition Builder
⢠A configuration management tool for creating customized versions of
LibX
â Customized version of LibX = LibX edition
⢠Edition configuration includes descriptions of community-local
resources:
â OPACs, OpenURL, Proxy, Databases, Links, Branding, âŚ
⢠Edition Builder is easy to use
â Makes heavy use of OCLC registries
â Uses sophisticated auto-detection techniques
â Usable by librarians, not just programmers
⢠Anybody can create, share, and manage editions
⢠Over 550 edition as of now, new ones created at a pace of 20/month
â Huge human investment
â 10âs of thousands of end users
2/26/2009 Code4Lib 2009 4
5. Where to go from here?
Where to go from here?
⢠A toolbar is great but
great, butâŚ
⢠Emerging technology trends
â Service oriented architectures web services
Service-oriented architectures,
interfaces â soon even to ILS!
â Data mash-ups; HTML widgets
p; g
⢠Educational trends: librarians, educators, and
users create
â Online tutorials, subject guides, visualizations
â Social OPACs: tagging, reviews, recommender services
gg g, ,
2/26/2009 Code4Lib 2009 5
6. But who will
create those
World Wide Web
W ld Wid W b
modules?
LibraryÂ
Resources and
Web Services
LibXÂ 2.0Â plugin: executes
Libapps, merging lib
Lib i library
LibX 2 0
2.0
information into pages.
Users:
decide to which
library services to
Librarians: create or
subscribe, see
adapt Libapps from
expanded view of the
reusable, shareable
web
modules
2/26/2009 Code4Lib 2009 6
7. The LibApp
The LibApp Model
⢠How can the interaction of LibX with web content be
modeled?
⢠Typical tasks involve
â Examination of the page and extraction of information
â Processing of information
â Modification of the page
⢠A Module is a small piece of JavaScript code along with
a metadata description of its input and/or output
⢠A Libapp is a group of modules
⢠A Package is a folder of libapps and packages
2/26/2009 Code4Lib 2009 7
8. Modules
⢠Modules a e named us g a U a d pub s ed
odu es are a ed using URL and published
via REST/AtomPub
⢠Modules can reference JavaScript libraries (e.g.,
p g
jQuery) and CSS stylesheets
â Execute in a parallel environment to the client page
⢠Modules are trusted, with full access to LibX API,
including edition configuration and user
preferences
⢠Modules communicate with each other via tuple
space
2/26/2009 Code4Lib 2009 8
9. LibX Tuple Spaces
tuple = TAKE(template)
=Â TAKE(template) WRITEÂ (tuple)
WRITE (tuple)
⢠If a tuple matching template ⢠Write a tuple into the space
exists in the tuple space, ⢠If a TAKE is pending with a
remove it and return it matching template,
⢠If no tuple exists, wait until complete the TAKE
a matching tuple is written
written,
remove it and return it
Tuples and Templates are JavaScript objects in JSON notation.
Tuple example: { isbn: â0743226720â }
Template example: { isbn : * } // any tuple with âisbnâ field
p p yp
2/26/2009 Code4Lib 2009 9
10. Jangle
ISBN Lookup Display Result
{ display:
âISBN 223.. is on the shelfâ
Guarded-By: Guarded-By:
ISBN Scraper }
{ isbn: 2234532134 }
{ isbn: *} { display: * }
Tuple Space
2/26/2009 Code4Lib 2009 10
11. Rationale for Tuple
Rationale for Tuple Spaces
Software Engineering
Software Engineering Handling Asynchrony
Handling Asynchrony
⢠Low coupling between ⢠User actions happen
modules asynchronously
⢠Independent composition ⢠Information arrives
asynchronously from
⢠Simplicity
external sources
⢠Suitable for meta-
⢠Execution order
programming
independence
p
2/26/2009 Code4Lib 2009 11
21. COinS, the LibX 2.0 way
COinS, the LibX 2.0 way
<span class=quot;Z3988quot;
Include:Â /.*/ title=quot;ctx_ver=Z39.88-
Description: Find COinS
D ii Fi d COi S 2004&rft_val_fmt=info:ofi/fmt:kev:mtx:j
ournal&rft_id=info:pmid/16646082&rft.g
Require:Â jquery
enre article
enre=articlequot;>
$(âspan.Z3988quot;).each(function () {
libx.space.write({
p ({
coins:Â this,
contextobj:Â this.getAttribute('title')
});
});
2/26/2009 Code4Lib 2009 21
22. COinS, the LibX 2.0 way
COinS, the LibX 2.0 way
Include:Â /.*/
Description: Link COinS
GuardedâBy:Â {Â coins:Â libx.space.WILDCARD }
Require:Â legacyâcues
var cue new libx cues StandardCoins(tuple contextobj);
cue = new libx.cues.StandardCoins(tuple.contextobj);
cue.insertBefore(tuple.coins);
2/26/2009 Code4Lib 2009 22
24. Add Link/360 direct link
Add Link/360 direct link
var link360Â =Â libx.services.link360.getLink360(libx.edition);
if (link360)
if (li k360)
link360.getMetadata({
query: tuple.contextobj, Â
type: 'article',
hasFullText: function (xmlDoc, url, databaseName) {
cue.setAttribute( href , url);
cue.setAttribute('href', url);
cue.setAttribute('title', quot;Users of quot; + libx.edition.links.primary.label
+ quot; click here for full text via quot; + databaseName);
cue.setImageAttribute('src', 'http://www.lib.vt.edu/images/getvtext.gif');
tI Att ib t (' ' 'htt // lib t d /i / t t t if')
cue.animate();
},
});
2/26/2009 Code4Lib 2009 24
25. Transitioning from LibX 1.0 to 2.0
Transitioning from LibX 1.0 to 2.0
⢠Complete redesign of LibX client code
p g
⢠Browser-independent, strictly object-oriented
JavaScript code with proper namespacing and
encapsulation
⢠Provide full documentation (via jsdoc, accessible
in about:libx)
⢠Provide built-in interactive reflection of data
structures
⢠Include unit tests (run via Rhino)
⢠Hot updatable
2/26/2009 Code4Lib 2009 25
26. LibXÂ 2.0Â RolesÂ
LibX 2.0 â Roles
LibX 2.0 Developers â make services
b l k
available and write modules and libapps
LibX 2.0 Adapters â combine
20
modules into libapps, reuse and
adapt libapps, bundles and share
libapps as packages
LibX 2.0 User Community - subscribes
to packages or libapps they like
2/26/2009 Code4Lib 2009 26
27. LibX 2.0 Community Repository
2.0 Community Repository
⢠Based on tuple space model, create metadata
pp ,
descriptions for modules
⢠Create a repository of modules, libapps, and
packages
⢠Editable like a Wiki
⢠Integrate repository into Edition Builder
â Include consistency checking
⢠This will be done during the next 2 years (but
libapps can already be created now)
2/26/2009 Code4Lib 2009 27
28. Call for Developers
Call for Developers
⢠Launched Developer Website
â http://developers.libx.org
⢠Launched mailing list
â libx-dev@googlegroups.com
⢠Transition path: update from LibX 1 5
1.5
⢠Agile roll-out, no âreleasesâ
⢠We invite you to try and play with it!
2/26/2009 Code4Lib 2009 28
29. LibXÂ Team
LibX Team
Annette Baileyy
â˘
Godmar Back
â˘
Kyrille Goldbeck
â˘
Mike Doyle
â˘
Arif Khokar
â˘
Travis Webb
â˘
Alumni
â˘
â N th Baker
Nathan B k
â Tilottama Gaat
â Tobias Wieschnowsky
y
2/26/2009 Code4Lib 2009 29