-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: async
Context
In the async API, our KMS requests still use raw sockets due to the inherent limitations of the core asyncio.Protocol. Writing a second Protocol specifically for KMS would allow us to remove the entire async socket networking layer, significantly reducing the amount of maintained code.
Definition of done
A one-week timeboxed proof-of-concept to attempt replacing our KMS socket code with an asyncio.Protocol version. This implementation should be concerned chiefly with functionality and completeness. Another key deliverable will be how much code can be cleanly refactored with the removal of all raw socket usage from the async API. A successful completion of this ticket would reveal how much additional work is needed for a production-ready implementation as well as the performance of raw sockets vs Protocols for KMS.
Pitfalls
asyncio.Protocol implementations are notoriously complicated to write. KMS performance should increase or remain static in the worst case after a successful Protocol is implemented.