I've mentioned previously that there's some interest for backend or queue adapter plugins. @brockdyer03 prompted me by doing some work to update Molequeue. (It would be great to have Molequeue back, particularly for users who want a dedicated resident queue manager that keeps managing local and remote jobs even when Avogadro is closed.)

I want to create some discussion and feedback feedback on a Backend Protocol v2 architecture designed to keep MoleQueue first-class and make the broader compute ecosystem sustainable for a volunteer open-source team.

Maintainability

  1. Trying to support every service. Supporting Slurm, PBS, SGE, LSF, HTCondor, WebMO, Galaxy, AWS/GCP Batch, HPC gateways, and custom cluster wrappers inside a single C++ codebase is hard to test and maintain. (Let alone running local jobs on Linux, macOS, and Windows.)
  2. A separate plugin for every cluster. Asking every university or lab to maintain custom Python/C++ code just because their Slurm uses --mem instead of --mem-per-cpu, or needs -M smp or suborca, doesn't work either, IMHO.

Proposal: Four defined roles over JSON-RPC

The idea is to extend MoleQueue's JSON-RPC 2.0 protocol so existing input generators keep their Submit workflow, while splitting execution into four small, well-bounded roles:

| Role | What it handles | How a new site or tool is added ||----|----|----|| 1. Built-in local & MoleQueue bridge | Simple local jobs on a laptop/teaching workstation with zero extra installs, plus a live MoleQueue instance in the same picker when you want a full resident queue daemon | Auto-detected / existing MoleQueue queues || 2. One unified hpc backend | Lab Linux GPU boxes (no scheduler), Slurm, PBS Pro, SGE, LSF, HTCondor, cloud Slurm clusters, and site wrappers—all over SSH | A shareable JSON profile file only (no code) || 3. Thin REST gateway plugins | Managed services that handle their own environments: WebMO, Galaxy, ChemCompute, slurmrestd, cloud batch, AiiDA | Small (\~150–300 line) plugin implementing a 5-method core || 4. Registries & caches (optional) | Workgroup/public calculation databases like ccreg or QCArchive (browse, pre-submit findJob, post-run register) | Linked directly inside a group profile |

Here's why I think this can work:

  • Profiles, not plugins, for cluster diversity. Differences between clusters (partitions, --mem vs --mem-per-cpu, $SLURM_SCRATCH, module load lines, allocation accounts) live in layered JSON (or TOML) profiles (Site → Group → Machine → Personal). A guided Profile Builder dialog in Avogadro can test SSH, probe partitions/modules, preview the rendered script, run a water test job, and export a sanitized profile (secrets and username stripped) for a class, research group, or a shared OpenChemistry/avogadro-profiles repo like the plugin ecosystem.
  • A tiny 5-method core for backend plugins. A working compute backend only needs describe, testConnection, submitJob, lookupJobs, and fetchFiles. Everything else (listQueues, listTools, submitWorkflow, cancelJob, listJobs, peekFile, estimateCost, discoverPrograms) is opt-in via declared capabilities. That keeps gateway plugins small enough for the WebMO, Galaxy, or AiiDA communities to maintain themselves.
  • Standardized post-run steps in Program Adapters. Real workflows rarely end when the QM binary exits—you often want to convert ORCA .gbw → Molden (orca_2mkl), run Gaussian formchk, remove .tmp/.rwf scratch files, or gzip large outputs before transferring them back. Putting these once in curated "Program Adapter" steps lets users toggle them safely with checkboxes instead of scattering raw shell snippets across profiles.


Discuss this on our forum.