Reputation: 131
I need some advice as to how to approach a project I am getting ready to start.
We have a windows app user interface that contains 20 chart controls, each on it's own tab control.
These charts show data on a part as it moves through a conveyor line in a factory.
Each chart shows data from different sensors in different areas of the conveyor line.
The sensors all talk to a black box interface, which in turn sends out a byte[] stream.
I connect to the byte stream from a socket connection on the server and read the data into my program.
On connection to that socket the byte stream sends out the last 100 records to update the charts with.
After the first initial 100 records the byte stream only sends out updated data.
This byte stream is changing constantly, every few seconds.
I cannot make any changes to how the byte stream works.
In the windows app, I take that byte stream apart, translate it back into readable data and store that information into a table in memory.
Only the last 100 records are stored in the table.
Using a background worker, I am constantly reading the byte stream and updating the table, and from there update the charts.
All of this work is done in the windows app.
I would like to create a service to do all of this work in.
I would like to have the service send out just the serialized chart data and create a gui that will read in the charts on the client end and update the charts to the user.
I have to have the ability to update the client as the server is updated from the byte stream. So all updates have to be initiated through the server.
I have looked at WCF, but it seems that using a backgroundworker is frowned upon.
Looking at just using a windows service seems likely, however, the client will have to initiate a call back to the service periodically and that won't really be in real time.
I've thought about a mixture of the two, but that seems like overkill, but maybe not - that's why I am seeking advice here!
Any help or suggestions would be appreciated! Thanks!
Upvotes: 2
Views: 144
Reputation: 1897
I would do it like this:
[black box] -> [ -> [service] -> [data storage] -> [wcf service] ] -> [your app]
principal schema:
Upvotes: 2