1 / 22

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

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

akiva
Download Presentation

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

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Good Fences Make Good Neighbors1Middleware 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

  2. Agenda • Short review of Aleph XML APIs • What is the API adapter? • Why did we build it? • Design criteria • How does it work? • Use cases

  3. Aleph XML APIs: X-server • http://walter.mit.edu/X?op=bor-info&library=mit50&bor_id=rwenger@mit.edu • http://walter.mit.edu/X?op=bor-by-key&bor_id=rwenger@mit.edu

  4. Aleph XML APIs: REST* • http://walter.mit.edu:1891/rest-dlf/patron/50481/circulationActions/loans • http://walter.mit.edu:1891/rest-dlf/patron/164423/circulationActions/cash * REpresentationalState Transfer - rest-web-services

  5. Aleph XML APIs Standard access configuration Aleph REST API External system

  6. What 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 Aleph’s cgi-bin directory.

  7. What is the API adapter? Access configuration with adapter installed Aleph REST API External system Adapter

  8. Why 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.

  9. Why 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.

  10. Why 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.

  11. Design – 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

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

  13. Design – the adapter should.. • Function in a transparent pass-through mode for all REST API services except for those intentionally modified by the host site.

  14. How 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.

  15. Use case 1, ID translation • For patron functions, the REST API requires the patron’s 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 API’s.

  16. Calls to Aleph REST API without the adapter installed. Two calls. Aleph server Apache Ports 80, 443 JBOSS REST API Port 1891 X-server API http://walter.mit.edu/X?op=bor-by-key&bor_id=rwenger@mit.edu XML 50481 http://walter.mit.edu:1891/rest-dlf/patron/ External System

  17. Calls to Aleph REST API with the adapter installed in passive mode. Two calls. Aleph server Apache Ports 80, 443 JBOSS REST API Port 1891 X-server API Adapter http://walter.mit.edu/X?op=bor-by-key&bor_id=rwenger@mit.edu XML 50481 http://walter.mit.edu/rest-dlf/patron/ External System

  18. Calls to Aleph REST API with the adapter installed and using the X-server transparently. One call. Aleph server Apache Rewrite rule JBOSS REST API Port 1891 X-server API Adapter XML http://walter.mit.edu:1891/rest-dlf/patron/rwenger@mit.edu External System

  19. Use case 2, data filtering • When 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.

  20. Good Fences Make Good Neighbors Maintain control of the terrain where systems meet. Aleph REST API External system

  21. Useful Links • REST architecturehttp://www.slideshare.net/cebartling/rest-web-services • Aleph REST APIhttps://developers.exlibrisgroup.com/aleph/apis/Aleph-RESTful-APIs • Aleph X-serverhttps://developers.exlibrisgroup.com/aleph/apis/Aleph-X-Services • Ex Libris Developer Networkhttps://developers.exlibrisgroup.com/

  22. Finis Rich Wenger rwenger@mit.edu Phone 617-253-0035 Fax 617-253-4462

More Related