good fences make good neighbors 1 middleware for aleph’s rest api

Download Good Fences Make Good Neighbors 1 Middleware for Aleph’s REST API

Post on 05-Jan-2016




0 download

Embed Size (px)


Good Fences Make Good Neighbors 1 Middleware for Aleph’s REST API. Rich Wenger, E-resource Systems Manager MIT Libraries. 1. Frost, Robert. “Mending Wall” Collected Poems of Robert Frost. New York, Henry Holt and Co ., 1930. 47. Print. Agenda. Short review of Aleph XML APIs - PowerPoint PPT Presentation


SFX in Barton The project that wouldn't end

Good Fences Make Good Neighbors1Middleware for Alephs REST API

Rich Wenger, E-resource Systems ManagerMIT Libraries1. Frost, Robert. Mending Wall Collected Poems of Robert Frost. New York,Henry Holt and Co.,1930. 47. PrintAgendaShort review of Aleph XML APIsWhat is the API adapter?Why did we build it?Design criteriaHow does it work?Use cases

Aleph IGeLU 2014Page 2Aleph XML APIs: X-server

Aleph IGeLU 2014Page 3Aleph XML APIs: REST*

* REpresentational State Transfer - rest-web-services Aleph IGeLU 2014Page 4Aleph XML APIsAleph IGeLU 2014Page 5AlephREST APIExternal system Standard access configurationWhat is the API adapter?A thin layer of programming between the Aleph REST API and external systems that use the API.

A Perl program that runs from Alephs cgi-bin directory.

Aleph IGeLU 2014Page 6What is the API adapter?Aleph IGeLU 2014Page 7AlephREST APIExternal system AdapterAccess configuration with adapter installedWhy did we build it?To insulate Aleph and the calling system from each other, particularly in the case of a competing vendor. The software reflects the business model.

To provide an avenue for problem circumvention that does not depend on either Aleph or the calling system.

Aleph IGeLU 2014Page 8Why did we build it?To minimize the latency of network traffic by bringing multiple calls to the API inboard on the Aleph server instead of extending them across the network.

APIs change over time and between releases. An intermediate layer can mask such changes unless or until they prove useful.

Aleph IGeLU 2014Page 9Why did we build it?Simplifies access control. There is one place to whitelist external servers instead of multiple Aleph configuration files.

Provides the flexibility to augment Aleph data from other local systems if so desired.

Aleph IGeLU 2014Page 10Design the adapter should..Integrate easily into the Aleph server environment.

Have a small footprint and be unobtrusive in its operation.

Return results ~identical to those generated by the Aleph REST API. before and after

Aleph IGeLU 2014Page 11Design the adapter should..Not interfere in any way with the standard use of the Aleph REST API through the Tomcat/JBOSS server and port.

Consume Aleph REST API URL syntax without modification.

Aleph IGeLU 2014Page 12Design the adapter should..Function in a transparent pass-through mode for all REST API services except for those intentionally modified by the host site.

Aleph IGeLU 2014Page 13How does it work?The adapter uses an Apache rewrite rule to direct REST URLs to itself running on port 80.The external system sends its REST calls to port 80 instead of 1891.The adapter parses the incoming URL and sends the request to the Aleph REST API via localhost.Output from the REST API is passed back to the caller after any desired processing.Aleph IGeLU 2014Page 14Use case 1, ID translationFor patron functions, the REST API requires the patrons Aleph id. Few, if any, authentication systems return an Aleph id as an identifier.The REST API has no function to convert an alias to the corresponding Aleph id, but the X-server does.This forces calling systems to use two calls across the network instead of one, and two different APIs. Aleph IGeLU 2014Page 15External SystemAleph server JBOSS REST APIPort 1891ApachePorts 80, 443Calls to Aleph REST API without the adapter installed. Two calls.X-serverAPI SystemAleph server JBOSS REST APIPort 1891ApachePorts 80, 443Calls to Aleph REST API with the adapter installed in passive mode. Two calls.X-serverAPI SystemCalls to Aleph REST API with the adapter installed and using the X-server transparently. One call. server ApacheRewrite ruleAdapterJBOSS REST APIPort 1891X-serverAPIUse case 2, data filteringWhen using the adapter with the X-server.The bor-info method returns historical data, including paid fines.The adapter can filter paid fines from the response XML.Aleph IGeLU 2014Page 19Good Fences Make Good NeighborsAleph IGeLU 2014Page 20AlephREST APIExternal system Maintain control of the terrain where systems meet.Useful LinksREST architecture REST API X-server Libris Developer Network IGeLU 2014Page 21FinisRich Wenger

Phone 617-253-0035

Fax 617-253-4462Aleph IGeLU 2014Page 22


View more >