Push or pull model RRS feed

  • Question

  • User-958122079 posted

    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?

    Monday, November 29, 2010 3:08 PM


All replies

  • User-474980206 posted

    if you need low latency then push is best. if its a local lan then i'd use UDP/IP instead of TCP/IP. 

    Monday, November 29, 2010 3:27 PM
  • User-958122079 posted

    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

    Monday, November 29, 2010 3:44 PM
  • User-1573135047 posted

    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.

    Tuesday, November 30, 2010 3:30 PM
  • User-952121411 posted

    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:


    Duplex Services:


    Pushing Data to a Silverlight Client with a WCF Duplex Service:


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 1, 2010 11:12 AM
  • User-699953111 posted

    Make the client request the data.

    What happens if the client is not connected or lose connection?

    Monday, December 6, 2010 8:33 AM