[web] Update notifications in Silverlight/WCF
Hi all,
I am implementing a job queue using Silverlight/WCF. The idea is that the UI runs on the client, and the queue on the server. All job managing is done on the server via service calls from the UI.
Problem is, these are all one-way calls. The UI makes a service call, and the only sort of notification I can latch on to is by hooking the Completed event of the service call.
Let's say I have a queue of 3 jobs. The user presses "start queue". How can I know when each of the 3 jobs are finished, so I can update the UI visually (ex. remove that job from the list)? Note that the Completed event isnt useful here because it only gets called once the entire queue has been processed.
Thanks in advance.
thanks, I guess I didn't know the proper term to google for. Trust me I did visit google first before posting here :)
I will look into this to see how it works out.
I will look into this to see how it works out.
I can think of two options off the top of my head. As long as your client has items in its "pending items" queue, you just poll a status service at a fixed interval. The return from that service will tell you the status of each item. Alternatively, you can open TCP sockets in Silverlight on ports 4502-4534. Create a socket server that your client can connect to and get "real-time" information on the status of the jobs.
Hi,
WCF also has support for "Duplex Bindings", which makes it possible for WCF to call methods on the Client - the client provides the WCF service with an interface. (That is if your are going to look into modifying the service...)
WCF also has support for "Duplex Bindings", which makes it possible for WCF to call methods on the Client - the client provides the WCF service with an interface. (That is if your are going to look into modifying the service...)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement