How handel-hub/dmifpas works
Purpose and topology
DMIFPAS is a multi-part job-processing platform: an Express API accepts/authenticates users, files, and jobs; a DFPS engine plans and dispatches execution; a Main Core scores and schedules jobs. The root README provides no operational detail. Primary runnable entry points appear to be EXPRESS/src/server.mjs for the API and DFPS-2.0-ENGINE/src/local-coordinator/runtime/runtimeOchestrator.mjs for local execution coordination.
API and ingress boundary
The Express service exposes auth, file, job, and user routes, with controllers/services separating HTTP concerns from domain operations. Job submission is the handoff toward asynchronous processing through a queue publisher.
• EXPRESS/src/app.mjs
• EXPRESS/src/server.mjs
• EXPRESS/src/jobs/queuePublisher.mjs
• EXPRESS/src/routes/jobs.routes.mjs
Persistent API domain
API models cover users, files, and jobs; configuration includes a database integration. Authentication and authorization middleware protect request handling. This is the external client/data boundary rather than the execution engine.
• EXPRESS/src/config/database.mjs
• EXPRESS/src/models/jobs.model.mjs
• EXPRESS/src/services/jobs.service.mjs
• EXPRESS/src/middleware/auth.mjs
Local Coordinator: job normalization and DAG planning
The DFPS Local Coordinator transforms incoming job/context structures into a weighted DAG, validates schemas, and extracts/normalizes planning inputs. Its planner is a Python subprocess-oriented component, indicating a Node.js-to-Python control boundary for elastic dispatch decisions.
• DFPS-2.0-ENGINE/src/local-coordinator/core/dag-builder/dagBuild.mjs
• DFPS-2.0-ENGINE/src/local-coordinator/core/schemas/job.schema.json
• DFPS-2.0-ENGINE/src/local-coordinator/utils/contextExtractor.mjs
• DFPS-2.0-ENGINE/src/local-coordinator/core/planner/Gateway.py
Local execution and worker-pool control
The coordinator’s runtime orchestrates a managed process pool. Slot allocation, worker registration/actions, and memory control determine when and where DAG work can execute. Workers are batched before downstream communication, separating local process management from remote dispatch.
• DFPS-2.0-ENGINE/src/local-coordinator/runtime/runtimeOchestrator.mjs
• DFPS-2.0-ENGINE/src/local-coordinator/core/pool-manager/processPoolOrchestrator.mjs
• DFPS-2.0-ENGINE/src/local-coordinator/core/pool-manager/slotManager.mjs
• DFPS-2.0-ENGINE/src/local-coordinator/infrastructure/workerBatcher.mjs
State, profiling, and durability
Per-job state and CPU, I/O, memory, and time profiles feed planning/scheduling decisions. A write-ahead log provides a durability/recovery boundary, while the local queue decouples ingress from coordinator processing.
• DFPS-2.0-ENGINE/src/local-coordinator/core/state/jobStateRegistry.mjs
• DFPS-2.0-ENGINE/src/local-coordinator/core/state/cpuProfile.mjs
• DFPS-2.0-ENGINE/src/local-coordinator/core/state/memoryProfileStore.mjs
• DFPS-2.0-ENGINE/src/local-coordinator/infrastructure/wal.mjs
Main Core scheduling
Main Core maintains a global job queue, derives metrics and scores, applies affinity, and selects jobs through a scheduler. It is the global policy layer, distinct from the Local Coordinator’s machine/process-level dispatch.
• DFPS-2.0-ENGINE/src/maincore/globalJobQueue.mjs
• DFPS-2.0-ENGINE/src/maincore/metricEngine.mjs
• DFPS-2.0-ENGINE/src/maincore/jobScoring.mjs
• DFPS-2.0-ENGINE/src/maincore/scheduler.mjs
Infrastructure and protocols
The platform is primarily Node.js ES modules, with Python used for elastic planning. gRPC/protobuf artifacts define an inter-service protocol, and infrastructure includes a database adapter plus gRPC sender/server/client support. Queue and database implementations are not identifiable from the tree alone.
• DFPS-2.0-ENGINE/files/dfps.proto
• DFPS-2.0-ENGINE/src/infrastructure/grpcSender.mjs
• DFPS-2.0-ENGINE/files/grpc-server.mjs
• DFPS-2.0-ENGINE/src/infrastructure/db.mjs
Main entry points: runtimeOchestrator.mjs Runtime Orchestrator · jobs.service.mjs Job Service · dagBuild.mjs DAG Builder · processPoolOrchestrator.mjs Process Pool
Components 27
Express API
External request and persistence boundary.
- API Server
EXPRESS/src/server.mjs - HTTP Application · Hosts auth, file, job, and user routes.
EXPRESS/src/app.mjs - Auth Middleware
EXPRESS/src/middleware/auth.mjs - Job Routes
EXPRESS/src/routes/jobs.routes.mjs - Job Service
EXPRESS/src/services/jobs.service.mjs - Job Model
EXPRESS/src/models/jobs.model.mjs - API Database · Persists API users, files, and jobs.
EXPRESS/src/config/database.mjs - Queue Publisher · Publishes submitted jobs for processing.
EXPRESS/src/jobs/queuePublisher.mjs
DFPS Local Coordinator
Normalizes jobs and controls local execution.
- Runtime Orchestrator · Coordinates local job execution.
DFPS-2.0-ENGINE/src/local-coordinator/runtime/runtimeOchestrator.mjs - Local Job Queue · Decouples coordinator intake from processing.
- DAG Builder · Validates and converts jobs into weighted DAGs.
DFPS-2.0-ENGINE/src/local-coordinator/core/dag-builder/dagBuild.mjs - Job Schema
DFPS-2.0-ENGINE/src/local-coordinator/core/schemas/job.schema.json - Context Extractor · Normalizes job and context inputs.
DFPS-2.0-ENGINE/src/local-coordinator/utils/contextExtractor.mjs - Elastic Planner · Subprocess boundary for elastic dispatch decisions.
DFPS-2.0-ENGINE/src/local-coordinator/core/planner/Gateway.py - Process Pool · Manages worker processes and actions.
DFPS-2.0-ENGINE/src/local-coordinator/core/pool-manager/processPoolOrchestrator.mjs - Slot Manager · Allocates execution slots and controls memory.
DFPS-2.0-ENGINE/src/local-coordinator/core/pool-manager/slotManager.mjs - Worker Batcher · Batches worker output before remote communication.
DFPS-2.0-ENGINE/src/local-coordinator/infrastructure/workerBatcher.mjs - Job State Registry · Tracks job state and execution profiles.
DFPS-2.0-ENGINE/src/local-coordinator/core/state/jobStateRegistry.mjs - Write-Ahead Log · Supports recovery of coordinator state.
DFPS-2.0-ENGINE/src/local-coordinator/infrastructure/wal.mjs
Main Core
Global scheduling policy layer.
- Global Job Queue
DFPS-2.0-ENGINE/src/maincore/globalJobQueue.mjs - Metric Engine
DFPS-2.0-ENGINE/src/maincore/metricEngine.mjs - Job Scoring · Applies scores and affinity.
DFPS-2.0-ENGINE/src/maincore/jobScoring.mjs - Scheduler · Selects jobs under global policy.
DFPS-2.0-ENGINE/src/maincore/scheduler.mjs
Inter-service Infrastructure
Remote dispatch and service protocol.
- DFPS Protocol · Defines the gRPC inter-service protocol.
DFPS-2.0-ENGINE/files/dfps.proto - gRPC Sender
DFPS-2.0-ENGINE/src/infrastructure/grpcSender.mjs - gRPC Server
DFPS-2.0-ENGINE/files/grpc-server.mjs - Engine Database
DFPS-2.0-ENGINE/src/infrastructure/db.mjs
Connections 27
- API Server → HTTP Application: starts
- HTTP Application → Auth Middleware: protects requests
- Auth Middleware → Job Routes: authorizes
- Job Routes → Job Service: submits jobs
- Job Service → Job Model: uses
- Job Model → API Database: persists to
- Job Service → Queue Publisher: publishes
- Queue Publisher → Local Job Queue: enqueues
- Local Job Queue → Runtime Orchestrator: delivers jobs
- Runtime Orchestrator → Context Extractor: normalizes input
- Context Extractor → DAG Builder: planning input
- Job Schema → DAG Builder: validates
- DAG Builder → Elastic Planner: plans dispatch
- Runtime Orchestrator → Job State Registry: tracks state
- Runtime Orchestrator → Write-Ahead Log: logs for recovery
- Elastic Planner → Process Pool: dispatches plan
- Slot Manager → Process Pool: allocates slots
- Process Pool → Worker Batcher: batches worker work
- Worker Batcher → gRPC Sender: sends batches
- gRPC Sender → gRPC Server: gRPC
- DFPS Protocol → gRPC Sender: defines messages
- DFPS Protocol → gRPC Server: defines service
- gRPC Server → Global Job Queue: receives jobs
- Global Job Queue → Metric Engine: job data
- Metric Engine → Job Scoring: metrics
- Job Scoring → Scheduler: scores and affinity
- Scheduler → Engine Database: uses