Skip to main content

Simple Seamless jobserver implementation

Project description

seamless-jobserver

seamless-jobserver is a lightweight async HTTP service in the Seamless ecosystem. It receives transformation jobs over HTTP, dispatches them to spawned Seamless worker processes, and returns the results. It is one of the four backend services that seamless-remote connects to.

This is a standalone service, not a library. User workflow code never imports seamless-jobserver — it runs as an independent process, normally launched by seamless-config via remote-http-launcher. The only user-facing entry point is the seamless-jobserver CLI command.

How it works

The jobserver is a single-module (jobserver.py) aiohttp server. On startup it spawns a pool of Seamless worker processes (via seamless-transformer). Incoming transformation requests arrive over HTTP, are dispatched to the worker pool, and results are returned to the caller — which is always seamless-remote's jobserver_remote module, never user code directly.

HTTP endpoints

Endpoint Method Description
/ GET Welcome / version check
/healthcheck GET Liveness probe
/run-transformation GET Execute a transformation and return the result checksum

Lifecycle

  1. seamless-config writes a status file and launches seamless-jobserver (via remote-http-launcher or directly).
  2. The jobserver picks a port (fixed or random from a range), spawns worker processes, and starts listening.
  3. It writes its port and status back to the status file so seamless-remote can discover it.
  4. If no requests arrive within the inactivity timeout, the jobserver shuts down automatically.

Relation to the Seamless ecosystem

    seamless-transformer                (user-facing API: direct, delayed)
        │
        │  delegate job
        ▼
    seamless-remote
        │  jobserver_remote
        │  async HTTP
        ▼
    seamless-jobserver                 ◄── this package
        │
        │  dispatches to worker pool
        ▼
    seamless-transformer worker        (spawned child processes)

The jobserver sits between seamless-remote (which sends it work) and seamless-transformer (whose worker processes do the actual computation). It is a simpler, single-machine alternative to the Dask-based execution path provided by seamless-dask.


CLI

seamless-jobserver [options]
Flag Default Description
--port PORT Listen on a specific port (mutually exclusive with --port-range)
--port-range START END Pick a random free port from a range
--host HOST 0.0.0.0 Listening address
--status-file PATH JSON file for reporting port and status
--timeout SECONDS Auto-shutdown after this many seconds of inactivity
--workers N 1 Number of worker processes to spawn

Installation

pip install seamless-jobserver

Requires Python >= 3.10. Dependencies: aiohttp, seamless-core, seamless-transformer. Also imports seamless-remote and seamless-config at runtime for client cleanup and remote-client configuration respectively.

Project details


Download files

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

Source Distribution

seamless_jobserver-0.1.2.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seamless_jobserver-0.1.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file seamless_jobserver-0.1.2.tar.gz.

File metadata

  • Download URL: seamless_jobserver-0.1.2.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for seamless_jobserver-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ea9634ed8b200f2817394f6b49330148023b863ee82ab2c7237053993e6813de
MD5 967b4192579e3df1b14fcdc5ee97acd2
BLAKE2b-256 0811b5076451b3d7da07fabd1a9bfde4b2785002eed52d4bcb2c0412f507a2d8

See more details on using hashes here.

File details

Details for the file seamless_jobserver-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for seamless_jobserver-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f6ad93a4c7da9166198f0ca8f76329c89c6d6441d5369a41b11fea3d3029c768
MD5 b5e9c20a5cfa4be7c598ca7e134614ba
BLAKE2b-256 64b1354669e1c1e43a4f845558289a81b35bee342f6a67d96de8320db8f8eb4f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page