|Component Factories and multiple services [message #813870]
||Mon, 05 March 2012 20:07
| abadamcd1 abadamcd1
Registered: December 2011
I've been trying to grasp how to use component factories with this application I'm developing.|
There are 3 services that need to work together:
A socket service that handles connections to a remote server.
A communications parser that parses a custom protocol I have to program to.
A device manager that keeps track of the states of various custom devices on the remote server.
Basically the station manager relies on the parsed commands from the comm processor, which gets raw protocol packets from the socket service.
Getting these to work together has been easy. What I'm having trouble with is if I wanted to do this on multiple servers. So there would be a socket component, com parser, and device manager created for each remote server.
I've thought about doing this with component factories, since the number of remote servers could expand easily. What I'm having trouble conceptualizing is how to specifically chain each service to one another.
Server 1 <-- sock service 1 <-- com processor 1 <-- device manager 1
Server 2 <-- sock service 2 <-- com processor 2 <-- device manager 2
Server n <-- sock service n <-- com processor n <-- device manager n
What I ideally want to do is have some preferences saved that stores which servers the user wants to connect to and then make a chain like above for each of the servers.
I have a number of ideas on how to do this, but I was wondering if there was a suggested practice for having factory components that depend on other factory component services.
Powered by FUDForum
. Page generated in 0.02025 seconds