The circuits-based implementation has some logic spread across multiple classes. They should all be consolidated as much as possible. Also, the classes should be refactored into abstract base classes and default implementation ones (e.g. from application import Application) should be for circuits. Additionally, adding a purely threading-based version (like original client) could be useful if we run into more bugs with circuits. Would also allow for potentially using something like asyncio or Twisted in the future...
Specifically, we need to refactor the following classes:
- SensedEvent relies on circuits.Event (relayed_sensed_event too)
- VirtualSensor and some other sensors have a bunch
- Application has (should have) most (all?) of it
- Broker is just a circuits.Manager
The circuits-based implementation has some logic spread across multiple classes. They should all be consolidated as much as possible. Also, the classes should be refactored into abstract base classes and default implementation ones (e.g. from application import Application) should be for circuits. Additionally, adding a purely threading-based version (like original client) could be useful if we run into more bugs with circuits. Would also allow for potentially using something like asyncio or Twisted in the future...
Specifically, we need to refactor the following classes: