Designing a background Task Manager

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
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 !

Designing a background Task Manager

Postby sjt on Wed Jul 01, 2015 3:41 pm

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:

  • 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

Postby sjt on Thu Jul 02, 2015 8:57 am

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

Postby AndyS|Dyalog on Fri Jul 03, 2015 8:18 am

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.
User avatar
AndyS|Dyalog
 
Posts: 257
Joined: Tue May 12, 2009 6:06 pm


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest