Show progress of running java process, even after reopening webpage -
i working company developing web based software j2ee.
on our webapp possible upload csv file. ive got kind of reader class reads each line , processes it. (it checks if values in each csv line valid , inserts them database). along reader counts lines read show number @ end of process.
users can upload file , click on 'process' button, after process starts. these processes can have long duration since csv files can big. when users closes webbrowser process still continues on server.
i want users let them follow progress. when close browser , log in again. guess there should kind of id attached each process, know user's process , status of progress is?
is there kind of mechanism in java can accomplish this?
the simplest way track progress process write update database table - 'jobs'. when user uploads new csv file , hits 'process', can first make entry table. process periodically writes table progress. when user logs in account can see jobs had started , progress. not cleanest approach work done. lot of things depend on specific framework. perhaps make entry table process id , there wont need update progress in table. frontend use rpc process query progress.
Comments
Post a Comment