Pynenc MongoDB Plugin¶
Full-stack MongoDB backend for Pynenc distributed task orchestration.
The pynenc-mongo plugin provides all five Pynenc components running on MongoDB,
with automatic document chunking for large payloads and a pseudo-atomic ownership
protocol for distributed invocation management.
pip install pynenc-mongo
Components at a Glance¶
Component |
Class |
Role |
|---|---|---|
Orchestrator |
|
Invocation lifecycle, ownership consensus & blocking control |
Broker |
|
FIFO message queue using MongoDB collections |
State Backend |
|
Persistent state, results & exceptions with auto document chunking |
Client Data Store |
|
Argument caching with compression for large payloads |
Trigger |
|
Event-driven & cron-based scheduling with distributed claims |
Quick Start¶
from pynenc import PynencBuilder
app = (
PynencBuilder()
.app_id("my_app")
.mongo(url="mongodb://localhost:27017/pynenc") # all components on MongoDB
.process_runner()
.build()
)
@app.task
def add(x: int, y: int) -> int:
return x + y
.mongo() registers every component at once. See Installation & Quick Start for
environment-variable and Docker Compose alternatives.
Get up and running with PynencBuilder, environment variables, and Docker Compose examples.
All connection, pool, retry, chunking, and orchestrator settings — with types, defaults, and descriptions.
Document chunking, retryable operations, pseudo-atomic ownership, and the full collection layout.
Part of the Pynenc ecosystem · Redis Plugin · RabbitMQ Plugin