Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish Asyncio Port of BLED112 Transport Plugin #907

Open
timburke opened this issue Nov 27, 2019 · 0 comments
Open

Finish Asyncio Port of BLED112 Transport Plugin #907

timburke opened this issue Nov 27, 2019 · 0 comments
Labels

Comments

@timburke
Copy link
Member

Note This is still a draft epic that has not yet been prioritized or staffed.

We never finished the port of the BLED112 device adapter over to asyncio. There are a few nuanced to doing the port that need to be thought through though.

  1. pyserial does not fully support asyncio on all platforms so we can't just ditch the ReaderThread and move to a fully asyncio based solution on Windows at least. See the alternative implementation for how to improve the status quo without needing that.

  2. Moving to asyncio properly will require refactoring how BLED112CommandProcessor handles long-running operations. Right now it uses a hybrid blocking wait with event dispatch while waiting system that is problematic but means moving to a proper asyncio system will need to rework the way commands are sent.

  3. Making sure we retain the current implementation robustness will mean porting over the new implementation to use OperationManager to handle the parallelism of having different coroutines waiting on different ble operations. For example, there could be 3 simultaneous connections in progress each one blocking on a read or a write or a connect operation. We need to make sure that each connection gets its events properly without blocking other connections.

The final result should be that we have a fully asyncio-based bled112 device adapter that should be more performant as well as easier to reason about. Once we have that, we can work on generalizing the coroutine based ble interface to support other kinds of ble controller hardware.

@timburke timburke added the Epic label Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant