I am working on an application.
The application goes like this. I am a recent grad and still learning the power of WCF.
client1 should not directly interact with client2.
The problem I have right now is I have a webservice. Client1 can interact with the webservice and insert some commands to DB. Client2 reads the command execute the command and put the results back in db. The client1 should know that the command is executed and it should read the results from db.
As soon as a Command is inserted by client1, the webservice has to intimate a client2 that a command is ready in the db, and client2 can go ahead and execute the command.
I hav开发者_如何学Pythone no idea how the webservice can intimate client2 that a command is ready for execution in db and then intimate client1 when the results are ready.
Any help is appreciated.
Thanks,
WCF supports duplex contracts. That is, you can have a service contract which has a corresponding callback contract. This can be used by the service to call the client back.
See "Duplex Services" in the MSDN Library.
精彩评论