We are building a multi-device (different vendors, different types) manufacture machinery where these device work together orchestrated by our software and operated by a human being to create various products.
We are currently working on establishing an architecture for handling many different devices with an outlook on:
- Device auto-discovery and wizard like configuration.
- Easily adding new vendor devices support.
The software runs on Windows machines and besides hardware specific logic has quite a lot of domain logic on product creation.
Initial thoughts are to focus on reducing coupling between domain and hardware logic, so that adding new hardware would require minimum amount of work and on a very isolated part of the code base, thus hopefully making it easy.
For this purpose we are looking into making use of ports and adapters architecture where the domain logic describes what features it needs as ports and the hardware module implements them via specific drivers based on currently available hardware as adapters.
Since we have multiple vendors that offer devices which share functionality, we also want to add an abstraction layer on top of it to describe abstract devices without coupling ourselves into specific vendor when implementing features.
For the details of handling multiple devices, managing connectivity, etc. we are looking into architecture very similar to the Linux kernel, where we have multiple bus types (USB, serial, Ethernet, etc.) where in turn each has its own list of available drivers (in this case a driver is a piece of software enabling some features for the domain). Then there is a device, which when connected to a specific bus gets probed by available drivers until a match is found and attached to the device, which is then initialized and prepared for usage.
Here is a diagram summarizing the current architecture:
At this point in time a combination of ports and adapters architecture and a Linux-like handling of specific vendor hardware seems to make sense. But this was designed mostly following generic architecture practices.
Therefore the question is two-fold:
- Are there any flaws identifiable at this point in time with the current design?
- Are there alternative established architectures specific for multi-device machinery?
Any other suggestions/comments are welcomed.