Introduction
The Local Binaries Provider is a side project of the Binaries Service. The main functionality of this service is to provide access to the content of a zip file via HTTP. In DDB there are cases where binaries associated to an ingest process are not provided on external servers but instead are delivered as zips together with the data to be ingested. To keep the workflow simple and to prevent handling special cases in the Binary Service, these zips can be uploaded to the Local Binary Provider and downloaded from there as if they were external resources.
Technology
The Local Binar iesProvider is implemented as a plain Java Servlet intendend to run on Tomcat 9 with Java 8.
Implementation Details
The application consist of to main classes. The UploadService class is an implementaion of HTTPServlet and handles the HTTP communication and saves the received archives to the filesystem. It delegates the work to the UploadService which unpacks the data synchronously.
Furthermore there is a Cleaner class which is a thread that runs in regular intervals and cleans unpacked archives older than a predefined number of days. This should prevent the system from running out of disk space.
The actual delivery of the unpacked archive contents is handled by Tomcat because the Local Binaries Provider simply unpacks the archive in the Tomcats web-root directory.
API Documentation
METHOD | URL | Description | |
---|---|---|---|
POST | / | Accepts a multipart/form-data request containing the archive file and its name. |
Deployments
There is a deployment in the development network automatically updated by Bamboo and one in the production network responsible for the production and qa-systems.