⚠️ Project Status
Edge Worker should be considered an advanced Proof of Concept.
It is not production-ready at this time.
I am actively working on resolving several known issues.
PostgresError: DbHandler exited
When processing a high volume of jobs with increased concurrency (10 or more), the system occasionally fails with the following error:
This issue appears to be related to abruptly terminated SQL connections in Session Mode. When this error occurs, it prevents the system from spawning new instances.
Postgres Deadlocks
In high-concurrency scenarios, I’ve observed occasional deadlocks. These occur due to race conditions between message archiving and message pickup when visibility timeouts expire (educated guess).
The planned solution involves implementing worker-side retries for SQL queries.
Planned Architecture Improvements
Following the resolution of current issues, a major architectural refactor is planned. The main goals are to:
- Implement proper dependency injection
- Introduce a factory/builder pattern
- Enable easy component swapping, including:
- MessageExecutor (required for pgflow orchestrator integration)
- Polling mechanism (replacing ReadWithPollPoller with ListenNotifyPoller for improved performance)