I am trying to design an event driven system where the elements of the system communicate by generating events that are responded to by other components of the system. It is intended that the components be independent of each other - or as largely independent as I can make them. The system will initially be implemented on Windows 7, and is being written in Delphi. The generated events will be generated by the Delphi code. I understand how to implement a system of the type described on a single machine.
I wish to design the system so that it can readily be deployed on different machine architectures in particular with different components running on a distributed architecture, which may well be different to Windows 7. There is no requirement for the system ever to communicate with any systems external to itself.
I have tried investigating the architecture I need to consider and have looked at the questions mentioned below. These seem to point towards utilising named pipes as a mechanism for inter-hardware communications. As a result of these investigations I have sketched out the following to describe my system - the first part of the diagram is the system as I am developing it; the second part what I have deduced I would need for possible future implementations.
This leads to the following points:
- Can you pass events via named pipes?
- Is this an appropriate and sensible structure to tackle this problem?
- Are there better alternatives?
- What have I forgotten (at this level of granularity)?
How is event driven programming implemented? How do I send a string from one instance of my Delphi program to another?
EDIT:
I had not given the points arising from "@I give crap answers" response sufficient consideration. My initial responses to his points are:
- Synchronous v Asynchronous - mostly asynchronous
- Events will always be in a FIFO queue.
- Connection loss - is not terribly important - I can afford to deal with this non-rigourously.
- Unbounded queues are a perfectly good way of dealing with events passed (if they can be) - there is no expectation of large volume of event generation.