Skip to content

Anized/ingestion-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ingestion-service

Image

Overview

The ingestion-service utilizes Akka Http to provide an asynchronous, streaming API.

On accepting and validating an upload request (POST, multipart/form-data), the byte stream and metadata are passed to the Upload route, which first calls the Storage service to stream the bytes to a file system file, before calling Vendor service (now that it knows the size of the upload), to verify the vendor has upload quota available.

If not, the file is deleted from store and an appropriate error is returned.

If all ok, a metadata record is written to the quotas table, and a Json response returned, containing a contextUrl field that may be used for future manipulation of the document (see API doc)

Image

A good intro to Akka streams from Zalando

Building

Test Coverage

$ sbt 'set coverageEnabled := true' clean coverage test coverageReport

Coverage report: docs/coverage/scoverage-report/index.html

Docker Image

Build a docker image:

$ sbt docker:publishLocal

Running docker image locally:

$ docker run \
 --env SERVER_PORT=8080 \
 --env API_PORT=8081 \
 --env SPRING_CLOUD_SERVICE_REGISTRY_AUTO_REGISTRATION_ENABLED=true \
 --net=host anized/ingestion-service:2022.02

See also: starting Postgress

Run demo in Nomad

To run this service as part of the Nomad demo

Nomad

API

Description of the REST API form document upload and download exposed by the service

API

Releases

No releases published

Packages

No packages published