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

MongoOrchestrator

Invocation lifecycle, ownership consensus & blocking control

Broker

MongoBroker

FIFO message queue using MongoDB collections

State Backend

MongoStateBackend

Persistent state, results & exceptions with auto document chunking

Client Data Store

MongoClientDataStore

Argument caching with compression for large payloads

Trigger

MongoTrigger

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.


🚀 Installation & Quick Start

Get up and running with PynencBuilder, environment variables, and Docker Compose examples.

Installation & Quick Start
⚙️ Configuration Reference

All connection, pool, retry, chunking, and orchestrator settings — with types, defaults, and descriptions.

Configuration Reference
🏗️ Architecture

Document chunking, retryable operations, pseudo-atomic ownership, and the full collection layout.

Architecture

Part of the Pynenc ecosystem · Redis Plugin · RabbitMQ Plugin