Here is my general idea.. tell me if it sounds fine or if there is a better way...
I have a MVC web app that accepts .xls file and processes them and puts the data into a DB. This can take awhile so I dont want to the user to upload a file and have it hang there... So I thought the best way is to upload the file and simple have a DB table
I write to with the information about the process that needs to happen.. and then have a seperate console app that runs once an hour or so that picks up the .xls file to be processed and processes them. This would then allow me to have a status screen on the
MVC site thsat could query the DB for which files are qued and complete.
Is there any alternative way to consider ?
Looking for ASP.NET/SL/XNA programmers to chat with on LIVE MESSENGER. Add me punkouter@hotmail.com
We had similar problem.. we used MSMQ and WCF to address it. all requests are queued up and WCF reads from it. Code blocks [Task approach] in WCF updates into backened. So user can have clear pictures what's happening after completion it wud notify user
using mail.
So rather than a console app on a scheduler you used MSMQ? Is that the more modern way to do this ? What are the advantages ? THe console on a scheduler seems easier to set up...
And then how is WCF being used ? Im confused about that one
Looking for ASP.NET/SL/XNA programmers to chat with on LIVE MESSENGER. Add me punkouter@hotmail.com
Our project is distributed enterprise application which has to do lot of content processing. Converting word to pdf vice versa, combining docs, pdfs run long process to sync records with contents ...lot of other mumbo jumbo stuff
punkouter
And then how is WCF being used ? Im confused about that one
We have server clusters which hosts services to maximize throughput and load balancing/scalability.
We dont use bazooka to kill mice :) We had to use this coz we expected this application will die after 10 years.
punkouter
Member
721 Points
205 Posts
Whats the best way to kick off a long running process in MVC and show progress?
Feb 20, 2013 08:47 PM|LINK
Here is my general idea.. tell me if it sounds fine or if there is a better way...
I have a MVC web app that accepts .xls file and processes them and puts the data into a DB. This can take awhile so I dont want to the user to upload a file and have it hang there... So I thought the best way is to upload the file and simple have a DB table I write to with the information about the process that needs to happen.. and then have a seperate console app that runs once an hour or so that picks up the .xls file to be processed and processes them. This would then allow me to have a status screen on the MVC site thsat could query the DB for which files are qued and complete.
Is there any alternative way to consider ?
CPrakash82
All-Star
18314 Points
2851 Posts
Re: Whats the best way to kick off a long running process in MVC and show progress?
Feb 21, 2013 12:00 AM|LINK
Sounds good, if your files are very large, this technique make sense.
ossprologix
Member
392 Points
127 Posts
Re: Whats the best way to kick off a long running process in MVC and show progress?
Feb 21, 2013 02:47 AM|LINK
We had similar problem.. we used MSMQ and WCF to address it. all requests are queued up and WCF reads from it. Code blocks [Task approach] in WCF updates into backened. So user can have clear pictures what's happening after completion it wud notify user using mail.
It had a huge performance boost.
Hope this helps
punkouter
Member
721 Points
205 Posts
Re: Whats the best way to kick off a long running process in MVC and show progress?
Feb 21, 2013 02:26 PM|LINK
So rather than a console app on a scheduler you used MSMQ? Is that the more modern way to do this ? What are the advantages ? THe console on a scheduler seems easier to set up...
And then how is WCF being used ? Im confused about that one
ossprologix
Member
392 Points
127 Posts
Re: Whats the best way to kick off a long running process in MVC and show progress?
Feb 22, 2013 02:55 AM|LINK
i guess so.
Our project is distributed enterprise application which has to do lot of content processing. Converting word to pdf vice versa, combining docs, pdfs run long process to sync records with contents ...lot of other mumbo jumbo stuff
We have server clusters which hosts services to maximize throughput and load balancing/scalability.
We dont use bazooka to kill mice :) We had to use this coz we expected this application will die after 10 years.