Write our own distributed locking (async etcd3 with concurrency API or aioredis v2 redlock) #383
Labels
area:upstream
Issues with root cause from upstream 3rd parties
effort:epic
Need to split into multiple sub-issues (epic).
Currently, Python's etcd3 client libraries have limtied support for latest updates such as concurrency API.
The official
grpcio
began to support asyncio natively since 1.30.0 release (June 2020) and the import namespace is fixed togrpc.aio
in 1.33.2, and it's now 1.44.0.However, etcd3, aioetcd3, etcd3-aio, aetcd3 libraries have not followed these updates and some of them are relying on a 3rd-party aiogrpc library, which seems to be abandoned in favor of the official
grpc.aio
. Moreover, all those libraries are not being actively maintained.Here is an issue about adding concurrency API to aetcd, but it seems not to be active:
Our
common.etcd
module wrapsetcd3
with our own async wrappers, but has many issues such as being unable to cleanly shutdown watcher threads. There have been several attempts to replace the underlying implementation, but none was succssful due to watcher API supports and poor cancellation supports.Now we desperately need to use a proper global lock implementation where locks can be arbitrarily defined at runtime.
Let's write a new etcd v3 client library using the official
grpc.aio
including the concurrency API support.We could also add our own high-level API to periodically generate a specific event via watcher API.
Potential alternatives:
aioredis-py
(v2). The official Redis docs is outdated:redlock-py
is absorbed intoredis-py
andaioredlock
has not caught upaioredis-py
v2.Rejected alternatives:
The text was updated successfully, but these errors were encountered: