简体   繁体   中英

WCF service reports long running job progress in real time

I am developing a reliable WCF service that should make some long running work and has an ability to report such work progress. For passing tasks for processing service uses MSMQ binding, which provide reliability. For reporting progress, I think, it should utilize an another TCP/HTTP binding which more suitable for real time sending percentage to subscribed clients.

Is this way right? Any samples for doing that right?

EDIT


I found this article , but it telling about an periodical client requests for percentage? My goal is server telling all subscribed clients about progress in real time.

You have two main MS options:

  • WCF duplex contracts
    However, this will be limited to a local network only

  • SignalR
    will work over the internet, but is not based on WCF

Have you researched Pub/Sub pattern? Publisher (your service) can post updates and subscribers can listen to those updates.

Here is one blog , code project to get you started...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM