Current collected state Current
Observed since 20 Oct, 18:06 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
AIMD-based adaptive throttling for asyncio, thread pools, and Kafka consumers — like a semaphore with a brain.
ACE v0.1.0 - Adaptive Concurrency Engine
pip install ace-concurrencyMonitored every 2 seconds:
Best for: I/O-bound work (API calls, database queries)
async with ACEAsyncioManager(config) as mgr:
await mgr.submit(your_async_task())
Best for: CPU-bound work (calculations, data processing)
with ACEThreadPoolManager(config) as mgr:
mgr.submit(your_sync_function)
Best for: Event streaming with backpressure
async with ACEKafkaConsumerManager(config, "topic") as mgr:
await mgr.process_async(handler)
config = AIMDConfig(
min_limit=1,
max_limit=100,
initial_limit=10,
)
config = AIMDConfig(
# Concurrency bounds
min_limit=5,
max_limit=200,
initial_limit=50,
# AIMD parameters
increase_step=5, # More aggressive increase
decrease_factor=0.3, # Faster decrease
# Thresholds (CPU/Memory %)
cpu_threshold=75.0,
memory_threshold=80.0,
cpu_increase_threshold=30.0, # Earlier proactive scaling
memory_increase_threshold=40.0,
# Timing (seconds)
adjustment_interval=1, # More frequent decisions
cooldown_period=10, # Longer wait after decrease
)
{
"timestamp": "2026-01-16T14:30:45Z",
"level": "INFO",
"message": "AIMD decision",
"decision": "INCREASE",
"current_limit": 10,
"new_limit": 12,
"signals": {
"cpu_percent": 35.5,
"memory_percent": 42.3,
"queue_depth": 5,
"event_loop_lag_ms": 2.1
}
}
| Property | Value |
|---|---|
| Package | ace-concurrency |
| Version | 0.1.0 |
| Python | 3.8+ |
| License | MIT |
| Status | Production-Ready |
| PyPI | https://pypi.org/project/ace-concurrency/ |
# During runtime (if you need dynamic adjustment)
with ACEAsyncioManager(config) as mgr:
# Limits controlled automatically by AIMD
# To override, set directly:
# Not recommended - trust AIMD algorithm
pass
async with ACEAsyncioManager(config) as mgr:
print(f"Current limit: {mgr.current_limit}")
print(f"Active tasks: {mgr.active_tasks}")
from ace.core.signals import SignalCollector
collector = SignalCollector()
collector.set_queue_depth(len(my_queue))
signals = await collector.collect_all_async()
# Multiple independent managers (recommended for isolation)
async with ACEAsyncioManager(config1) as mgr1:
async with ACEAsyncioManager(config2) as mgr2:
# Separate control loops
pass
intergrations/ directoryDownload counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.1 | 15 Jan 2026 | 2 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 18:06 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:b4bca4f773f689dad4452e41eeacc2ddaf1921e0dc372514820db88ba0becd8a