{"id":46838469,"url":"https://github.com/francescoingv/generic-processor-provider","last_synced_at":"2026-03-10T12:02:20.696Z","repository":{"id":337998692,"uuid":"1139148208","full_name":"francescoingv/generic-processor-provider","owner":"francescoingv","description":"Execution service used by pygeoapi plugins to run scientific processing codes. To be used in conjunction with ingv-pygeoapi-process-plugins","archived":false,"fork":false,"pushed_at":"2026-03-06T18:33:13.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-06T19:20:14.437Z","etag":null,"topics":["processing-service","pygeoapi","scientific-processing","workflow-execution"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/francescoingv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-21T15:31:29.000Z","updated_at":"2026-03-06T18:33:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/francescoingv/generic-processor-provider","commit_stats":null,"previous_names":["francescoingv/generic-processor-provider"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/francescoingv/generic-processor-provider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francescoingv%2Fgeneric-processor-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francescoingv%2Fgeneric-processor-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francescoingv%2Fgeneric-processor-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francescoingv%2Fgeneric-processor-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/francescoingv","download_url":"https://codeload.github.com/francescoingv/generic-processor-provider/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francescoingv%2Fgeneric-processor-provider/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30332857,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["processing-service","pygeoapi","scientific-processing","workflow-execution"],"created_at":"2026-03-10T12:02:19.402Z","updated_at":"2026-03-10T12:02:20.691Z","avatar_url":"https://github.com/francescoingv.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# INGV generic processor provider for pygeoapi plugins\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18892842.svg)](https://doi.org/10.5281/zenodo.18892842)\n![License](https://img.shields.io/badge/license-MIT-blue.svg)\n![Python](https://img.shields.io/badge/python-3.x-blue.svg)\n\nLightweight **generic processor provider**, acting as an **execution service**,\nused by the INGV pygeoapi processing platform\nto run scientific command‑line programs requested through **OGC API - Processes**\nservices implemented with **pygeoapi**.\n\n---\n\n## Overview\n\nThis repository contains a **Flask web application** implementing an\nexecution service used by the **INGV pygeoapi process plugins**.\n\nThe execution service receives execution requests from pygeoapi plugins via HTTP APIs,\ninvokes a configured application code through the command line,\nand returns the execution status and results.\n\nThe project acts as the **execution layer** of the platform architecture, while:\n\n- **pygeoapi** exposes OGC API - Processes endpoints\n- **pygeoapi plugins** manage process logic and job requests\n- **this service** executes the actual scientific processing code\n\nExecution takes place in a dedicated execution environment, enabling:\n\n- isolation of runtime environments\n- independent management of software dependencies\n- flexible deployment across different machines\n\n---\n\n## Design principles\n\nThe execution service design follows several principles:\n\n- **Minimal execution service** – focused only on executing command‑line applications\n- **Environment isolation** – scientific codes can run on dedicated machines\n- **Generic execution model** – any CLI program can be executed without modifying the service\n- **Decoupled architecture** – API infrastructure and execution environments remain independent\n\n---\n\n## Architecture diagram\n\n```mermaid\nflowchart TD\n\nClient[\"Client application\"] --\u003e API[\"pygeoapi (OGC API - Processes)\"]\nAPI --\u003e Plugins[\"pygeoapi process plugins\"]\nPlugins --\u003e Provider[\"generic-processor-provider\"]\nProvider --\u003e Code[\"Scientific processing code (CLI program)\"]\n```\n\n---\n\n## Execution workflow\n\n1. A client sends a processing request to **pygeoapi**.\n2. The corresponding **pygeoapi plugin** receives the request.\n3. The plugin sends an HTTP request to the **generic processor provider**.\n4. The provider executes the configured command‑line program.\n5. The provider collects execution results and job status.\n6. Results are returned to the plugin and exposed through the API.\n\n---\n\n## Platform components\n\n| Component | Repository | DOI | Role |\n|-----------|------------|-----|------|\n| processing platform | [ingv-pygeoapi-processing-platform](https://github.com/francescoingv/ingv-pygeoapi-processing-platform) | https://doi.org/10.5281/zenodo.18892848 | platform architecture |\n| pygeoapi process plugins | [ingv-pygeoapi-process-plugins](https://github.com/francescoingv/ingv-pygeoapi-process-plugins) | https://doi.org/10.5281/zenodo.18892819 | OGC API process implementation |\n| execution service | [generic-processor-provider](https://github.com/francescoingv/generic-processor-provider) | https://doi.org/10.5281/zenodo.18892842 | remote execution service |\n\n---\n\n## Processing codes\n\nThe service executes external scientific processing codes configured\nthrough the `command_line` parameter defined in `application.ini`.\n\nExamples of scientific codes executed through the platform:\n\n- **pybox** – scientific processing model to simulate the dispersals\n  of a gravity-driven pyroclastic density current (PDC)\n  \n  Repository: https://github.com/silviagians/PyBOX-Web\n  DOI: https://doi.org/10.5281/zenodo.18920969\n\n- **conduit** – scientific processing model for computing the one-dimensional,\n  steady, isothermal, multiphase and multicomponent flow of magma\n  in volcanic conduits\n\n- **solwcad** – scientific processing model to compute the saturation surface of\n  H₂O–CO₂ fluids in silicate melts of arbitrary composition\n\nThese codes are not part of this repository and must be installed\nseparately depending on the deployment environment.\n\n---\n\n## Configuration\n\nThe execution service configuration is defined by the following files.\n\n### Configuration files\n\nThe main configuration files of the execution service are:\n\n- `va_simple_provider/application.ini`\n- `va_simple_provider/database.ini`\n- `va_simple_provider/logging.cfg`\n\n### `application.ini`\n\nDefines application parameters and the command used to execute the code.\n\nMain parameters:\n\n- `max_allowed_parameter_len` - maximum length of a parameter name\n- `max_allowed_request_body_size` - maximum size of the HTTP request body\n- `id_service` - identifier of the service\n- `command_line` - command used to execute the application code\n- `suppress_stdout` - indicates whether the standard output of the process must be suppressed\n- `file_root_directory` - directory used for input and output files\n\n### `database.ini`\n\nDefines PostgreSQL connection parameters used for storing job information.\n\nExample:\n\n```ini\n[postgresql]\nhost=127.0.0.1\nport=5433\ndatabase=ogc_api\nuser=ogc_api_user\npassword=user\n```\n\n### Database schema\n\nThe execution service requires a PostgreSQL schema to store job execution data.\n\nThe schema is provided in:\n\n```text\npostgresql_schema.backup.sql\n```\n\nBefore starting the service, the database must be created and the\nschema imported.\nTo import the schema:\n\n\n```bash\npsql -U ogc_api_user -d ogc_api -f postgresql_schema.backup.sql\n```\n\nThe schema creates the main tables used by the service:\n\n- `request`\n- `request_parameter`\n\nThe `request` table stores information about received jobs and their\nexecution status.\n\nThe `request_parameter` table stores parameters associated with each\nrequest.\n\nThe user configured in `database.ini` must have access permissions\nto the tables and sequences defined in the schema.\n\n---\n\n## Service API\n\n### Execute a job\n\n```text\nPOST /execute\n```\n\nThe request body must contain a JSON object describing the execution parameters\nsent by the pygeoapi plugin when invoking the execution service.\n\nThe detailed request structure is described in the plugin documentation:\n\nhttps://github.com/francescoingv/ingv-pygeoapi-process-plugins#external-processing-service-interface\n\n### Job information\n\n```text\nGET /job_info/\u003cjob_id\u003e\n```\n\nReturns the execution status and job information.\n\n---\n\n## Project structure\n\n```text\ngeneric-processor-provider/\n├── requirements.txt\n├── postgresql_schema.backup.sql\n├── va_simple_provider/\n│   ├── __init__.py\n│   ├── application.ini\n│   ├── database.ini\n│   ├── logging.cfg\n│   ├── views.py\n│   ├── db_utils.py\n│   ├── custom_exceptions.py\n│   └── controllers/\n│       └── code_handler.py\n└── README.md\n```\n\n---\n\n## Docker deployment\n\nThe repository can be deployed using Docker.\n\nDefault service port:\n\n```\n5000\n```\n\n---\n\n## Requirements\n\nMain runtime dependencies:\n\n- Python ≥ 3.12\n- Flask\n- PostgreSQL\n- psycopg2\n- virtualenv / venv-run\n\nPython dependencies are defined in:\n\n```\nrequirements.txt\n```\n\n---\n\n## Related projects\n\nThis repository is a component of the **INGV pygeoapi processing platform**.\n\nThe platform consists of the following main software components:\n\n- **Processing platform**\n  https://github.com/francescoingv/ingv-pygeoapi-processing-platform\n  DOI: https://doi.org/10.5281/zenodo.18892848\n\n- **pygeoapi process plugins**\n  https://github.com/francescoingv/ingv-pygeoapi-process-plugins\n  DOI: https://doi.org/10.5281/zenodo.18892819\n\nThe **pygeoapi plugins** expose processing services through the\n**OGC API - Processes** standard and forward execution requests to\nthe **generic processor provider**, which executes the configured\nscientific application code.\n\nTogether these components implement the architecture of the\n**INGV pygeoapi processing platform**.\n\n---\n\n## Citation\n\nMartinelli, F. (2026).\n*Generic processor provider for external execution services used by\nINGV pygeoapi process plugins*.\nDOI: https://doi.org/10.5281/zenodo.18892842\n\n---\n\n## License\n\nThis project is distributed under the **MIT License**.\n\nSee the `LICENSE` file for details.\n\n---\n\n## Authors\n\nFrancesco Martinelli\nIstituto Nazionale di Geofisica e Vulcanologia (INGV)\nPisa, Italy\n\n---\n\n## Acknowledgements\n\nDeveloped at the **Istituto Nazionale di Geofisica e Vulcanologia (INGV)**.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancescoingv%2Fgeneric-processor-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrancescoingv%2Fgeneric-processor-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancescoingv%2Fgeneric-processor-provider/lists"}