Distributed locks with Python and Redis
summary
Implements production-ready distributed locking for a contact center: Python task manager (Twisted) coordinates workers and uses a single Redis instance as the locks server. Claims a working Redis strings + WATCH/MULTI/EXEC mutex for worker busy/idle state, a list-based semaphore with RPUSH/BRPOP to allow N simultaneous tasks, and a Lua script for atomic release and length return to avoid race conditions; warns against blocking calls inside MULTI/EXEC and stresses startup/restore procedures for consistency.
AI-written summary · about
chapters (3)
related talks
25mpersistent collections as a service
32mPython's Parallel Programming Possibilities - 4 levels of concurrency
27mBehind the Keys: Redis Oyster Cult
29mManaging scientific simulations with Python with RQ (Redis Queue)
29mTackling Thread Safety in Python
36mBuild a Cloud Native Asynchronous Messaging System For Scale With Redis
24mConsistency and isolation for Python programmers
33mAnd now to something ELSE: Real Time Data Processing @ billiger.de
