Aleph's REST API Middleware

G
o
o
d
 
F
e
n
c
e
s
 
M
a
k
e
 
G
o
o
d
 
N
e
i
g
h
b
o
r
s
1
M
i
d
d
l
e
w
a
r
e
 
f
o
r
 
A
l
e
p
h
s
 
R
E
S
T
 
A
P
I
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
A
g
e
n
d
a
1.
Short review of Aleph XML APIs
2.
What is the API adapter?
3.
Why did we build it?
4.
Design criteria
5.
How does it work?
6.
Use cases
Aleph  IGeLU 2014
Page 2
A
l
e
p
h
 
X
M
L
 
A
P
I
s
:
 
X
-
s
e
r
v
e
r
1.
http://walter.mit.edu/X?op=bor-info&library=mit50&bor_id=rwenger@mit.edu
2.
http://walter.mit.edu/X?op=bor-by-key&bor_id=rwenger@mit.edu
Aleph  IGeLU 2014
Page 3
A
l
e
p
h
 
X
M
L
 
A
P
I
s
:
 
R
E
S
T
*
1.
h
t
t
p
:
/
/
w
a
l
t
e
r
.
m
i
t
.
e
d
u
:
1
8
9
1
/
r
e
s
t
-
d
l
f
/
p
a
t
r
o
n
/
5
0
4
8
1
/
c
i
r
c
u
l
a
t
i
o
n
A
c
t
i
o
n
s
/
l
o
a
n
s
2.
h
t
t
p
:
/
/
w
a
l
t
e
r
.
m
i
t
.
e
d
u
:
1
8
9
1
/
r
e
s
t
-
d
l
f
/
p
a
t
r
o
n
/
1
6
4
4
2
3
/
c
i
r
c
u
l
a
t
i
o
n
A
c
t
i
o
n
s
/
c
a
s
h
*
 
R
E
p
r
e
s
e
n
t
a
t
i
o
n
a
l
 
S
t
a
t
e
 
T
r
a
n
s
f
e
r
 
-
 
r
e
s
t
-
w
e
b
-
s
e
r
v
i
c
e
s
Aleph  IGeLU 2014
Page 4
A
l
e
p
h
 
X
M
L
 
A
P
I
s
Aleph  IGeLU 2014
Page 5
Aleph
REST API
External system
Standard access configuration
W
h
a
t
 
i
s
 
t
h
e
 
A
P
I
 
a
d
a
p
t
e
r
?
1.
A thin layer of programming between the Aleph
REST API and external systems that use the API.
2.
A Perl program that runs from Aleph’s cgi-bin
directory.
Aleph  IGeLU 2014
Page 6
W
h
a
t
 
i
s
 
t
h
e
 
A
P
I
 
a
d
a
p
t
e
r
?
Aleph  IGeLU 2014
Page 7
Aleph
REST API
External system
Adapter
Access configuration with adapter installed
W
h
y
 
d
i
d
 
w
e
 
b
u
i
l
d
 
i
t
?
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 2014
Page 8
W
h
y
 
d
i
d
 
w
e
 
b
u
i
l
d
 
i
t
?
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 2014
Page 9
W
h
y
 
d
i
d
 
w
e
 
b
u
i
l
d
 
i
t
?
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 2014
Page 10
D
e
s
i
g
n
 
 
t
h
e
 
a
d
a
p
t
e
r
 
s
h
o
u
l
d
.
.
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 2014
Page 11
D
e
s
i
g
n
 
 
t
h
e
 
a
d
a
p
t
e
r
 
s
h
o
u
l
d
.
.
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 2014
Page 12
D
e
s
i
g
n
 
 
t
h
e
 
a
d
a
p
t
e
r
 
s
h
o
u
l
d
.
.
Function in a transparent pass-through mode for
all REST API services except for those
intentionally modified by the host site.
Aleph  IGeLU 2014
Page 13
H
o
w
 
d
o
e
s
 
i
t
 
w
o
r
k
?
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 2014
Page 14
U
s
e
 
c
a
s
e
 
1
,
 
I
D
 
t
r
a
n
s
l
a
t
i
o
n
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.
Aleph  IGeLU 2014
Page 15
External System
Aleph server
JBOSS REST API
Port 1891
 
Apache
Ports 80, 443
Calls to Aleph REST API 
without
 the adapter installed. 
Two
 calls.
X-server
API
 
http://walter.mit.edu/X?op=bor-by-key&bor_id=
rwenger@mit.edu
 
50481
 
http://walter.mit.edu:
1891
/rest-dlf/patron/
 
XML
External System
Aleph server
JBOSS REST API
Port 1891
 
Apache
Ports 80, 443
Calls to Aleph REST API with the adapter installed in passive mode.
Two
 calls.
X-server
API
 
http://walter.mit.edu/X?op=bor-by-key&bor_id=
rwenger@mit.edu
 
50481
 
http://walter.mit.edu/rest-dlf/patron
/
XML
Adapter
External System
Calls to Aleph REST API with the adapter installed and using the X-
server transparently. 
One
 call.
 
http://walter.mit.edu:
1891
/rest-dlf/patron/
rwenger@mit.edu
XML
Aleph server
 
Apache
Rewrite rule
Adapter
JBOSS REST API
Port 1891
X-server
API
U
s
e
 
c
a
s
e
 
2
,
 
d
a
t
a
 
f
i
l
t
e
r
i
n
g
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.
Aleph  IGeLU 2014
Page 19
G
o
o
d
 
F
e
n
c
e
s
 
M
a
k
e
 
G
o
o
d
N
e
i
g
h
b
o
r
s
Aleph  IGeLU 2014
Page 20
Aleph
REST API
External system
Maintain control of the terrain where systems meet.
U
s
e
f
u
l
 
L
i
n
k
s
REST architecture
http://www.slideshare.net/cebartling/rest-web-services
Aleph REST API
https://developers.exlibrisgroup.com/aleph/apis/Aleph-RESTful-APIs
Aleph X-server
https://developers.exlibrisgroup.com/aleph/apis/Aleph-X-Services
Ex Libris Developer Network
https://developers.exlibrisgroup.com
/
Aleph  IGeLU 2014
Page 21
F
i
n
i
s
  
Rich Wenger  
rwenger@mit.edu
  
           Phone
 
 617-253-0035
  
               Fax
 
 617-253-4462
Aleph  IGeLU 2014
Page 22
Slide Note
Embed
Share

Exploring the functionality and purpose of the API adapter for Aleph's REST API, this content delves into its design criteria, implementation, and use cases. Through a series of images and brief explanations, key aspects such as access configurations, insulation of systems, and network traffic optimization are highlighted. The middleware acts as a bridge between Aleph and external systems, enhancing operational efficiency and adaptability.

  • Aleph
  • REST API
  • Middleware
  • API Adapter
  • System Integration

Uploaded on Oct 06, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


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

  2. Agenda 1. Short review of Aleph XML APIs 2. What is the API adapter? 3. Why did we build it? 4. Design criteria 5. How does it work? 6. Use cases Aleph IGeLU 2014 Page 2

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

  4. Aleph XML APIs: REST* 1. http://walter.mit.edu:1891/rest-dlf/patron/50481/circulationActions/loans 2. http://walter.mit.edu:1891/rest-dlf/patron/164423/circulationActions/cash * REpresentational State Transfer - rest-web-services Aleph IGeLU 2014 Page 4

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

  6. What is the API adapter? 1. A thin layer of programming between the Aleph REST API and external systems that use the API. 2. A Perl program that runs from Aleph s cgi-bin directory. Aleph IGeLU 2014 Page 6

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

  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. Aleph IGeLU 2014 Page 8

  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. Aleph IGeLU 2014 Page 9

  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. Aleph IGeLU 2014 Page 10

  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 Aleph IGeLU 2014 Page 11

  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. Aleph IGeLU 2014 Page 12

  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. Aleph IGeLU 2014 Page 13

  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. Aleph IGeLU 2014 Page 14

  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. Aleph IGeLU 2014 Page 15

  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. Aleph IGeLU 2014 Page 19

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

  21. Useful Links REST architecture http://www.slideshare.net/cebartling/rest-web-services Aleph REST API https://developers.exlibrisgroup.com/aleph/apis/Aleph-RESTful-APIs Aleph X-server https://developers.exlibrisgroup.com/aleph/apis/Aleph-X-Services Ex Libris Developer Network https://developers.exlibrisgroup.com/ Aleph IGeLU 2014 Page 21

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

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#