We've got a spaghetti mess of an application that I've been tasked with rebuilding. I really want to make the new code much more flexible, and also more distributed.
On a basic level the application collects data from hardware, performs some control actions, displays the data, and lets the user send settings to hardware.
There was no separation, the code was hardware specific, no data access layer/disconnect between data, backend, control, and eventually UI. It was a horrible mess when we had a hardware change, and everything had to be reworked. It was also a single application on a single computer, yet we need it to be more modular. Maybe one server collects data and makes local control decisions etc, and when it has a link uploads that to a central database.
I'm trying to come up with some architecture/design patterns that will help with this and I've seen Event Aggregator come up a lot. However, it seems mostly aimed at the UI side of things, whereas I'm thinking of a cross-service/application messaging.
Does this sound like a sensible design? Does it sound like any design patterns out there? I don't want to re-invent the wheel.
The main principle of event agragators, that the source and consumer of the events know nothing of each other seems like it could be difficult to achieve when they don't share an application.