Results 1 to 1 of 1
- 12-20-2010, 04:10 PM #1Member
- Join Date
- Jul 2010
- Rep Power
timeconsuming process - what to do?
I was wondering if there is a 'right' way to design a timeconsuming process and make it user friendly and maintainable.
I have an operation that may take several minutes to complete, and i have a webinterface through which a user may request (among a variety of reports) the up-to-date result from that operation. Specifically, i look for certain discrepancies in a database. The result is a list of user id's, the date the first discrepancy occurred and an enum denoting the severity.
I have the businesslogic in place, but the technicalities elude me.
For the front end i will probably use polling, and i think i should store/cache the results in a table in case the request is repeated. The database is only updated once a day so the result is valid for the day, but should be recomputed if the results are older.
Another possibility is to use some kind of cron job to run the process every day right after the database update. The sysadmin would then get the extra task of re-scheduling the procedure if the database update gets rescheduled.
Writing the result to my database would also break part of the design where my webapp only *reads* data, so maybe i should store the result elsewhere, another database or maybe even in text file?
Has anyone implemented something similar?
- By saurabh208 in forum Java ServletReplies: 2Last Post: 08-25-2010, 10:11 AM
- By javameanslife in forum Advanced JavaReplies: 1Last Post: 01-21-2010, 08:46 AM
- By kcakir in forum Java 2DReplies: 1Last Post: 01-01-2010, 05:20 AM
- By smartsubroto in forum New To JavaReplies: 4Last Post: 11-16-2009, 04:09 AM
- By logicbug in forum Threads and SynchronizationReplies: 1Last Post: 03-16-2009, 03:11 PM