Thank you for your response. It is reassuring that you consider both DCI.
I do have one thing that I am concerned with - object ownership, or lifespan. Yesterday I started working on a context that is a RabbitMQ pubsub client. This context will be creating arbitrary objects depending on the exchange and routing key of the received message. I guess that's wrong, the messages are themselves objects and my context is simply transforming the same object from a text representation to a binary representation. Now I don't think it makes much sense that this pubsub client should own or control the lifespan of these objects, so what would be the correct approach? Perhaps having a managing role in the client context that takes care of this? Perhaps the object(s) to be managed could then be considered parameter(s) in a role method of the managing roleplayers system operation.
Another problem I'm facing is regarding threading. Simply put if I want to use my pubsub client in a graphical application then waiting for messages with the main thread is bad. If the view is considered an object and my pubsub client is considered an object, then necessarily they will have to operate with several threads. Now according to
http://fulloo.info/Documents/DCIExecutionModel-2.1.pdf DCI only supports single thread execution. I am worried if I end up having to make absolutely everything thread safe.
Am I on the right track, or veering off?