Last post Dec 06, 2010 08:33 AM by matyvegan
Nov 29, 2010 03:08 PM|grr0x|LINK
I have a question, I'm developing an application where a server needs to send data to multiple clients.
Now I was thinking of a push model where everytime new data is entered, the server pushes it to the client that it affects.
Only this would require a constant TCP connection to all clients, is this heavy for the server load? (eventually about 40 clients will be connected). Are there risks involved doing this?
The alternative is a windows service that refreshes let's say every 2 minutes and checks for new data, this doesn't need constant TCP connections but the factor is that it's important to have as little delay on the updates possible.
The push model would be brilliant, but the pull model is not that bad either. Any suggestions?
Nov 29, 2010 03:27 PM|bruce (sqlwork.com)|LINK
if you need low latency then push is best. if its a local lan then i'd use UDP/IP instead of TCP/IP.
Nov 29, 2010 03:44 PM|grr0x|LINK
yes but how heavy is this for the server as opposed to pull?
It's for a ordersystem, the server handles orders and sends them to the clients. Ofcourse it's great if this happens realtime, but if this is heavy on the server and if there are risks involved than I'd rather send a pull (every minute).
orders are put in a sql database, and that data needs to go to the clients
Nov 30, 2010 03:30 PM|rareddy|LINK
I would store the orders in a table, then have a completely separate service push them as they come into the queue. If the connection is dropped, you wouldn't lose any data because you wouldn't delete them from the table until they are pushed successfully.
Dec 01, 2010 11:12 AM|atconway|LINK
Have you considered using Silverlight and WCF using a duplex binding like netTCP? This is a great way to have the client get callbacks from the server essentially 'pushing' data to the client. Have a look as it works quite well:
How to: Build a Duplex Service for a Silverlight Client:
Pushing Data to a Silverlight Client with a WCF Duplex Service:
Dec 06, 2010 08:33 AM|matyvegan|LINK
Make the client request the data.
What happens if the client is not connected or lose connection?