-1

we are thinking to add chat and messages to our product. (like MSN) how can we create that , and how can a server call a client ? not the client calls the sever every couple of seconds? thanks

Guy
  • 11
  • 1

1 Answers1

2

If you are looking for the server to seem to push, you may want to look at long-polling technologies such as "Comet". But in my recent experience with chat.stackoverflow.com / chat.stackexchange.com - client polling can work reasonably well too, as long as you keep things sane.

Marc Gravell
  • 1,026,079
  • 266
  • 2,566
  • 2,900
  • @Guy well, I don't want to give away *all* our tricks, but (for example) we do things like throttling down the rate based on activity. If it is quiet, no need to poll aggressively. – Marc Gravell Dec 16 '10 at 20:30
  • nice idea we use it also, because we are working with transactions + time is very important + we have a lot of users we want to push the message to our clients not for then to request data every couple of seconds -> so your suggest comet ? by the way its a winform product can we do it under poet 80 ? – Guy Dec 16 '10 at 20:38
  • @Guy - for winforms, you might also want to look at some of the 2-way WCF offerings – Marc Gravell Dec 16 '10 at 20:42
  • did you mean full duplex? by the way what do you think of pulling vs pushing? – Guy Dec 16 '10 at 20:45