-6

Im having hard time to understand the advantages of callback on the basic way of making our client to be a service too and our service to be a client too.

Stav Alfi
  • 13,139
  • 23
  • 99
  • 171

1 Answers1

1

I can give you one big advantage. We have an application that involves a client (WPF) and a Windows service. Normally the client calls the service (via WCF) to retrieve and/or save data etc. But, there are times we want the service to send the client a message, to notify the client it needs to perform a certain action (like shutdown or display a message to the user - could be anything). A callback is perfect for this.

Randy Minder
  • 47,200
  • 49
  • 204
  • 358
  • Then why shouldnt I make the client a service and call the method? Why I need to use "Callback"-dealing with duplex, ServiceInstance, ..? – Stav Alfi Apr 28 '12 at 21:54
  • 1
    This totally depends on the type of application you are creating. For us, we've got multiple clients hitting our service. There are times we want our service to send a message to active clients. We already have the client talking to our service via WCF. Adding callback functionality was pretty trivial. – Randy Minder Apr 28 '12 at 21:58
  • Randy Minder Thanks. I have personal thing to ask you. I can see you work as a programer, how does math helps you to solve problems? only in methods or in wcf designing too? I have always been curious about this subject. – Stav Alfi Apr 28 '12 at 22:18
  • Math doesn't help me much at all. I will sometimes use basic algebra but that is somewhat rare. – Randy Minder Apr 28 '12 at 23:42
  • In what feild in programming, the math have a part? – Stav Alfi Apr 29 '12 at 11:53