Designing a background Task Manager
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
3 posts
• Page 1 of 1
Designing a background Task Manager
My app includes valuations that take 10min to 2 hours to run. I mean to run these as background tasks, for which I require a Task Manager (TM) that will report the status of valuations: queued, complete, 47% complete and so on. At our larger sites, TM should act as a load manager and run a valuation where there is spare processing capacity. Foreign programs should also be able to add valuations to the queue and read current status.
Here is what I have in mind. I’d value comments. TM should:
The app needs to detect it has been launched in background and instead of building the UI, query TM for the task details corresponding to the batch ID.
That much looks fairly straightforward with MiServer. I’m unfamiliar with running an always-on service like this. Clearly there has to be a way for the app (running either in foreground with a UI, or in background without) or a foreign program to relaunch it if an HTTP request times out. Must be well-established solutions for this?
Your thoughts?
Stephen
Here is what I have in mind. I’d value comments. TM should:
- report status by servicing HTTP requests at an IP:port pair defined for the site, returning status information in either XML or JSON.
- queue tasks with either GET or POST (I forget which is right for this)
- launch a valuation wit the Windows command shell, including a batch ID as a custom parameter
The app needs to detect it has been launched in background and instead of building the UI, query TM for the task details corresponding to the batch ID.
That much looks fairly straightforward with MiServer. I’m unfamiliar with running an always-on service like this. Clearly there has to be a way for the app (running either in foreground with a UI, or in background without) or a foreign program to relaunch it if an HTTP request times out. Must be well-established solutions for this?
Your thoughts?
Stephen
- sjt
- Posts: 21
- Joined: Fri Nov 05, 2010 6:26 am
Re: Designing a background Task Manager
The "always-on service" is a Windows Service. Page 61 of Dyalog APL Installation & Configuration Guide describes how to deploy a workspace as a Windows service.
- sjt
- Posts: 21
- Joined: Fri Nov 05, 2010 6:26 am
Re: Designing a background Task Manager
The mechanism which Steven is referring to is A4S, which appears in 14.0 onwards.
It's also worth pointing out that the page number may well change as these days we upload new versions of the documentation throughout the supported life of a version of Dyalog.
It's also worth pointing out that the page number may well change as these days we upload new versions of the documentation throughout the supported life of a version of Dyalog.
-
AndyS|Dyalog - Posts: 257
- Joined: Tue May 12, 2009 6:06 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group