[FEA] add async methods to Python binding
Please describe what you would like to see
Modern Python uses async (asyncio) to prevent potentially long-running operations from holding the Global Interpreter Lock (GIL).
Since BlueChi employs a network interface between the Controller and the Agent(s), these operations are potentially time consuming. Providing async methods would allow applications to code efficiently, even in the presence of slow clients or network delays.
Please describe the solution you'd like
Implement async equivalents to any potentially long-running operation
(this is a nice-to-have, and not an urgent need)
Hi @jwmelto,
Thanks for opening the issue.
The python bindings are auto-generated based on the dbus specification. Distinguishing between long- and short-running API calls is not possible there - at least without diverging from the specification format. The communication between bluechi-controller and bluechi-agent also use async communcation most of the time, e.g. starting a unit will create a job which can be watched. I think only for ListUnit(Files) this could make sense.
Because of these two reasons I think it's better to create async function wrappers on the fly if needed.
Because of the mentioned reasons, I am closing this issue. If this should still be a feature, please reopen it.