Two-way communication system used to deliver update requests from E-deposit to Aleph used in Czech National library. Updates may contain new http links to other systems or identifiers, like URN:NBN, or UUID.
Links created in Aleph cannot be changed automatically by direct-manipulation, so this project defines AMQP to XML protocol bridge. XML then copied over SCP to Aleph, processed and resulting XML response is then translated back to AMQP messages received by E-deposit.
Here is the list of Request -> Response pairs describing responses to AMQP communication:
LinkUpdateRequest ---> 0-N × LinkUpdateResponse
StatusRequest -------> 0-N × LinkUpdateResponse
Protocol is really simple - you can send the LinkUpdateRequest and
you will get back all waiting LinkUpdateResponse responses. If there is none, you won’t get any.
You can also trigger the lookup for waiting responses by sending periodic StatusRequest messages.
Module is hosted at PYPI,
and can be easily installed using PIP:
sudo pip install edeposit.amqp.aleph_link_export
Don’t forget to add proper paths into your configuration file (see settings for details) in /home/edeposit/aleph_export.json or /etc/edeposit/aleph_export.json.
- The directories have to be created before you try to run the project!
Project is released under the MIT license. Source code can be found at GitHub:
Almost every feature of the project is tested by unittests. You can run those
tests using provided run_tests.sh script, which can be found in the root
of the project.
If you have any trouble, just add --pdb switch at the end of your run_tests.sh command like this: ./run_tests.sh --pdb. This will drop you to PDB shell.
This script expects that package pytest is installed. In case you don’t have it yet, it can be easily installed using following command:
pip install --user pytest
or for all users:
============================= test session starts ==============================
platform linux2 -- Python 2.7.6 -- py-1.4.30 -- pytest-2.7.2
rootdir: /home/bystrousak/Plocha/Dropbox/c0d3z/prace/edeposit.amqp.aleph_link_export, inifile:
collected 17 items
========================== 17 passed in 0.25 seconds ===========================