Reputation: 259
I am looking for some direction on what is the best route I should go with this. I have posted a few times, going off of some recommended design patterns. I have not really received a good direction based on what I am trying to accomplish. I am new to working with Async Processing, and would appreciate some pointers in the right direction. So far, on one of my previous post I have been called ignorant because I requested code samples. Please understand I have been reading everything, and trying everything I can find on the internet. Needless to say there are a LOT of different directions I could go with this, and I am not sure which one is the best.
I will explain what I am trying to do, at a high level, and if anyone out there can PLEASE help me by pointing me in the right direction I would appreciate it. Also, if anyone can point me to some code samples, I would love that. I do not mind reading the material, but it makes a lot more sense if I can see code to follow along with what it is saying. Most of the documentation I have found has code samples, or partial code samples, and I have been doing my best to try to use what I have found to work with my specific need. So far, not much luck. I will admit, when it comes to ASYNC processing, I guess I am ignorant. :)
Anyway, here is what I am trying to accomplish. I am leaving out any specific technology that I may consider using to avoid the debate as to if what I am posting is out of date, or behind the times. I am looking for a point in the right direction, and I am open to whatever at this point. I just need to get this working.
If anyone can kindly point me in the right direction I will be very thankful. I do not mind doing the leg work and reading a mountain of documentation. I just need to be able to know what I am looking at will provide me with the above functionality. Like I said earlier, ignorance or not, if I can get some sample working code (not asking anyone to code this for me, just some code I can step through and help to understand what is happening) it would help a lot.
Thanks you in advance for your time and consideration.
Upvotes: 0
Views: 737
Reputation: 123739
Since you want some operation to happen at the server side along with the UI responding and showing progress. Showing progress of the event. I would suggest using Signalr.Net.
http://www.asp.net/signalr/overview/getting-started/tutorial-getting-started-with-signalr
This is a realtime web api and with this you can create a hub which has functions say "ProcessReport" and "cancelProcessing" you can call this from javascript while connection is open on click of the button and show the progress popup with a cancel button. Have a client event registered with the hub in js say "updatestatus" which can be called from the server to close the popup and eventually close the signalr connection, once the operation is finished. And similarly in the popup cancel click you can again call the hub function cancelProcessing and perform your cancellation and call back with updateStatus.
Hope this helps.
Upvotes: 1