Role: This page controls the IsPrime distributed prime computation lane. It coordinates distributed prime search workers communicating over WebSockets.
Section Order:
Normal Appearance: In steady-state operation, computation status displays 'Running', Connected Workers is greater than 0, overall progress advances smoothly, completed tasks increment towards the total, and running primes count increases. The Audit card should report active writers with 0 write errors and 0 lost events.
Run Lifecycle Controls: The primary operator deck provides Start New Run, Pause Run, Resume Run, Stop Run, Restart Run, and Archive & Clear Previous Run Data. Clear Previous Data safely moves computation_state.json and task_log.csv into archive/isprime/<timestamp>/, resetting run phase, run ID, audit sequence/tip, task queue, results, and worker stats.
Legacy Controls: The buttons inside the collapsible Legacy controls box (Start, Pause, Restart Server) perform the same actions as the Operator block and are preserved for backward compatibility. Clear Previous Data is deliberately NOT in that box — it stays in the visible row above it.
Audit Log & Rotation Card: Shows active segment size and health. The coordinator rotates and gzips the audit log automatically at UTC midnight (06:00 Dhaka) or at the size limit. h7-audit-refresh queries status, and h7-audit-rotate closes the active segment immediately.
Shared Persistence Panel: Mounts the unified persistence interface (persistence_panel.js) to view storage backend connectivity, active state records, and snapshot intervals.
Pool-Workers Panel & Entry Points: The coordinator Worker Management table lists WebSocket workers connected to IsPrime; the Pool Workers panel reads the shared pool across all lanes. Generic worker tabs serve IsPrime and SSPrime; Matrix tabs connect via worker.html?family=matrix.
Glossary:
archive/isprime/<timestamp>/, promotes staged config, creates new run ID, and rebuilds task queue. Keeps archived run data; resets run progress. Use when starting a fresh computation from idle or stopped state.| Worker ID | Tab ID | Status | Lane | IP | Task | Done | Primes | CPU | Browser/OS | Memory (JS Heap) | Actions |
|---|
Safe Phase 1 links and controls for WorkerStats. Features remain inactive until feature flags are enabled.
WorkerStats idle. Enable flags to activate rebuild.
|
Worker Pool|
Progress Details|
wasm_smoke.html|
These links open worker pages on the public worker domain. Use the default link for normal operations.
Use the test lanes only when you intentionally want P2P-lite, proof-mode stability, or the standalone
worker.js Prime lane.
| Lane | URL | Purpose | Recommended Use |
|---|---|---|---|
| Default Public Worker | https://ccgsc-demo.digitalbd.org | Generic default lane for normal users. | Daily operation, lowest confusion, public/default entry. |
| Generic P2P Test Worker |
https://ccgsc-demo.digitalbd.org/?p2pLite=1
https://ccgsc-demo.digitalbd.org/worker.html?p2pLite=1 |
Generic connector with browser-side P2P-lite flag enabled. | P2P-lite debugging, artifact path checks, controlled Stage 3 rehearsals; both equivalent URL forms are listed intentionally. |
| Generic P2P Proof Worker | https://ccgsc-demo.digitalbd.org/worker.html?p2pLite=1&proofMode=1 | Generic P2P lane with proof-mode reload softening. | Evidence collection, stable registry/query/signal/fallback testing. |
| Prime Standalone Proof Worker | https://ccgsc-demo.digitalbd.org/worker.html?primeStandalone=1&proofMode=1 | Standalone worker.js Prime lane with proof-mode stability. |
Reconnect testing, identity testing, Prime-only baseline, thesis comparison/control lane. |
Generic Worker via bare ?primeStandalone |
https://ccgsc-demo.digitalbd.org/worker.html?primeStandalone | Runs the generic worker, not standalone: the flag has no value, and standalone needs =1. |
Same as the default generic worker. For the real standalone page use ?primeStandalone=1, as in the row above. |
| Matrix Worker | https://ccgsc-demo.digitalbd.org/worker.html?family=matrix | Matrix ABI V2 lane: leases Matrix tasks and computes them in the browser (WASM). | Any Matrix run. Keep at least one tab open while a run is active; with no Matrix worker tab, Matrix tasks wait. |
| Worker Server HTML (Ops Path) |
/home/ccgsc-user1/CCGSC/PA10KT2/prime_distributed_projectPrlCc1B_V5_10K/workerServer.html
|
Server-side file reference for ops, SFTP/editor access, or future publish-to-web work. |
Use as an internal file path only. If later copied or exposed under public/, then add a real HTTPS link such as
https://ccgsc-demo.digitalbd.org/workerServer.html.
|
Notes: The last two links are now meaningful because the current worker page reads query flags and switches lane/module accordingly. Keep the default public worker as the normal user entry point.
SAVED DEFAULT loads at server start · ACTIVE is what the current run uses · STAGED applies on the next Start New Run or Restart Run. Task Count AUTO picks a sensible partition for the chosen N.
archive/isprime/<timestamp>/, promotes staged config, creates new run ID, and rebuilds task queue. Keeps archived run data; resets run progress. Use when starting a fresh computation from idle or stopped state.archive/isprime/<timestamp>/, promotes staged config, creates new run ID, rebuilds queue, and frees tasks held by worker tabs (discarding late answers if N or task count changed). Keeps archived run data; resets all active progress and clears held leases. Use to reset computation and immediately reclaim tasks from workers.Durability rules, checkpointing strategies, and journal parameters for the IsPrime coordinator.
Legend: full-legacy = old H9, whole state file rewritten per result and per dispatch (~2 GB/min at 27 tasks/s; for thesis comparison); coalesced = one whole-file save per window; journal = one small line per result + snapshot every 30 s or 500 results (default).
Help: "Stage for next run" writes staged.saveMode to coordinator memory now; active run continues unaffected until next start or restart.
Legend: strict = ACK only after the result is on disk (default); redo-allowed = ACK at once; after a crash the last window is recomputed. Applies LIVE.
Legend: h9-legacy = log + ACK, reproduces old runs; withhold = no ACK, like strict. Applies LIVE.
coalesceMs: Debounce window before saving in coalesced mode (ms).
snapshotEveryMs: Maximum interval between full state snapshots in journal mode (ms).
snapshotEveryResults: Results processed before forcing a snapshot in journal mode.
redoFsyncMs: Periodic disk fsync interval for redo-allowed journal mode (ms).
drainMs: Flush drain timeout before pause or stop (ms).
strictRetryMs: Retry interval if disk write fails under strict crash rule (ms).
Preset logging levels, individual custom logs, audit trail declaration, side-log durability fsync, and crash duplicate row reconciliation.
pool_admin publishes the lane policy to a file every 5 s; the coordinator follows it every second and uses it to decide whether a worker may be given IsPrime work. Enforcement off means the policy is carried but never refuses anything.
The coordinator closes the audit log at UTC midnight (06:00 Dhaka) or at the size limit, gzips the closed segment, checks it, and only then removes the plain copy. The active file keeps its name. Rotate now closes the current segment at once.
| Segment | State | Bytes | Gzip bytes | Closed (UTC) | Why / by | Gzip error |
|---|---|---|---|---|---|---|
| — | ||||||