Skip to main content

This package offers a HTTP REST API to a distributed service queue Service Gateway (SG).

Project description

NEP-143-2 Service Gateway

This package offers a HTTP REST API to a distributed service queue Service Gateway (SG).


It’s intended use is for the exploitation of services on the CANARIE network whose services are CPU intensive and which would benefit from a dynamic horizontal scaling approach to provide reasonable processing delays for the REST client and better reactivity of the interface itself.

The different functions offered by this code base are the following:

  • Provide a unified CANARIE REST interface for a collection of given services on a given infrastructure.
  • Provide a gateway to a queue-based distributed processing framework based on AMQP and Celery
    • A collection of utilities to aid in adding new worker types to the processing queues.
    • Implements a standard messaging scheme for workers / controller.
    • Passes arbitrary arguments onwards to the selected worker.
  • Provide an asynchronous API to query the advancement of long duration tasks.
    • Exposes methods to communicate progress [0-100] to the REST front-end.
  • Provides methods to evaluate infrastructure needs.

The documentation for this project can be found here .



  • Fixed a temporary files bug


  • Added the possibility to store all required files in service gateway temporarily


  • Updated VestaRestPackage to 1.9.3


  • Updated VestaRestPackage to 1.9.2


  • Updated VestaRestPackage to 1.9.1 with MongoDB support.


  • Fix handling of worker exceptions encoded in UTF-8.


  • Configuration directive no_params_needed is now optionnal.


  • Fix handling of case where JSON is submitted and no_params_needed = False.


  • Can use a JSON body subitted to the process route.
  • Configuration for a service can contain a no_parameter directive.
  • Fixes to error handling for certain types of exceptions.


  • Can use a task name a number of times on different queues.


  • Fix version declaration when called by WSGI.


  • Fix bug in arbitrary parameter use.


  • Arbitrary arguments which are unknown are passed onwards to the worker through the “misc” sub-structure in JSON.


  • First packaged release
  • Deployment configuration factored out of package


  • HTTP Authorization mechanism with JWT sent through HEADER on annotation requests.
  • Redirect to documentation pages which are to be statically hosted elsewhere
  • Can handle extra document specification in URL arguments (*_url or storage_*_id)


  • Add a ./service/. route to reflect CANARIE API requirements.


  • Use a version of transition 1.1.0 and faceanalysis 1.0.0 services that
    conform to the JSON-lD scheme.


  • Error handling is completed
  • Uniform error codes
  • More logs
  • Normalise some fields in the result structure


  • Support of storage_doc_id replacing the full URL
  • Queue will expires in 2 hours by default: Add a Status of EXPIRED when a queue is no longer available
  • Complete the annotations storage for a given ann_doc_id
  • Task UUIDs are stored using a method that supports concurrency


  • Support ann_doc_id argument.
  • New versioning scheme.


  • Add a cancel function to stop a running task.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ServiceGateway, version 1.9.2
Filename, size File type Python version Upload date Hashes
Filename, size ServiceGateway-1.9.2-py2-none-any.whl (16.1 kB) File type Wheel Python version py2 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page