Skip to content

ulsdevteam/request_broker

 
 

Repository files navigation

Request Broker

An application that accepts requests with lists of ArchivesSpace URIs from users of our discovery system. For each item, the application fetches data from ArchivesSpace, formats that data for delivery to our retrieval management system (Aeon) to enable reading room or duplication requests, or formats the data for email delivery or CSV download. It routes formatted data to the retrieval system or to an email for researcher use. This is a passthrough service; users cannot create requests directly in the application.

The request broker is part of Project Electron, an initiative to build sustainable, open and user-centered infrastructure for the archival management of digital records at the Rockefeller Archive Center.

Build Status

Getting Started

Install git and clone the repository

$ git clone https://github.com/RockefellerArchiveCenter/request_broker.git

Install Docker and run docker-compose from the root directory

$ cd request_broker
$ docker-compose build
$ docker-compose up

Once the application starts successfully, you should be able to access the application in your browser at http://localhost:8005

When you're done, shut down docker-compose

$ docker-compose down

Or, if you want to remove all data

$ docker-compose down -v

Configuration

The request broker manages configuration by setting environment variables. These variables can be seen in docker-compose.yml.

Deployment using the docker-compose.prod.yml or docker-compose.dev.yml files requires the presence of an .env.prod or .env.dev file in the root directory of the application. The environment variables included in those files should match the variables in docker-compose.yml, although the values assigned to those variables may change.

Services

  • Request Pre-Processing: Iterates over a list of request URIs, fetches corresponding data from ArchivesSpace, parses the data and marks it as submittable or unsubmittable.
  • Mailer: correctly formats the body of an email message and sends an email to an address or list of addresses.
  • Aeon Request Submission: creates retrieval and duplication transactions in Aeon by sending data to the Aeon API.
  • CSV Download: formats parsed ArchivesSpace data into rows and columns for CSV download.

Routes

Method URL Parameters Response Behavior
POST /api/deliver-request/email 200 Delivers email messages containing data
POST /api/process-request/parse 200 Parses requests into a submittable and unsubmittable list
POST /api/process-request/email 200 Processes data in preparation for sending an email
POST /api/download-csv/ 200 Downloads a CSV file of items

Development

This repository contains a configuration file for git pre-commit hooks which help ensure that code is linted before it is checked into version control. It is strongly recommended that you install these hooks locally by installing pre-commit and running pre-commit install.

License

Code is released under an MIT License, as all your code should be. See LICENSE for details.

About

Request broker repository for Project Electron

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 93.0%
  • Shell 5.5%
  • Dockerfile 1.5%