Reputation: 701
I am currently working with an inherited piece of code that uses a very interesting design pattern.
The code is split into a number of objects. I am not sure if the term object is applicable since it is a C code, but it is the best analogy. Each object has object-specific data, a thread, and a message queue. All objects primarily communicate by placing pre-defined messages onto each-other's queues. The main idea seems to be is that each object's data is only accessed by one thread. After doing some research I discovered that a few industrial automation applications are written this way (namely the ProfiNET stack and some EIP implementations).
Do you know if this pattern has a name or if it is describes somewhere in the literature? The "Pattern-Oriented Software Architecture" book by Schidt, Stal, et al does not mention it.
Thank you very much.
Upvotes: 1
Views: 144
Reputation: 92617
Check out Communicating Sequential Processes (CSP)
CSP allows the description of systems in terms of component processes that operate independently, and interact with each other solely through message-passing communication
It is actually one of the core design concepts that the Go language is based upon for communicating between goroutines (concurrency).
Upvotes: 0
Reputation: 10093
It might be me but is any other pattern except producer consumer combined with mutual exclusion used in what you described ?
Upvotes: 0