I know, maybe it's late, since the final release seems to be ready, yet, I think that the ideas below may be worth
One of the main issues when running the 1.5 is the fact that it's difficult to restart it if it "bombs"; now, there is an option to automatically restart the assp (either running as a daemon or as a service) but imVHo there may be a better approach Imagine the following: assp starts as a service (or as a daemon); upon startup it checks for cmdline arguments to check for a "--service" (or "--daemon") option; missing that, ASSP proceeds to initialize to a bare minimum (e.g. starts up its "service" loop) and then spawns (exec) a second copy of itself but this time using the "--service" flag; this second copy then loads, fully initializes and proceeds processing the mail flow, while the first copy (the parent one) just loops "idling" and checking that the child copy is alive if the child copy suddenly dies or in case it does not answer in a timely fashion, the parent just "kills" it and restarts it (after a given pause); the above may possibly solve both the autorestart and the monitor/restart issues The idea is more or less to have a "watchdog" which constantly keeps an eye on the main worker process and, in case of failure, proceeds restarting it Also, since we're at it; one of the biggest limitations of the 1.5 is the fact that, being singlethreaded, it slows down a lot in case a number of users start requesting "block reports" through the email interface; and in some cases, scheduling the reports to "run at midnight" won't help since you may have users from all around the globe Now, I understand that 1.5 is a single threaded program, yet, when it comes to such "batch" tasks, there may be a solution to the above issue... another "cmdline option" :) the idea is the following; when receiving a block report request, ASSP should queue it, then, either after a number of requests or, after a given time, it will save the email addresses asking for a report into a temporary file with an unique name and spawn (exec) a copy of itself using a cmdline option like (e.g.) "--report /path/tempfile" where path/tempfile are the path and the name of the temporary file containing the addresses; the second spawned copy will see the "--report" option, skip all the "regular code" and just open the temp file, load the list of addresses, delete it and then proceed generating and sending the reports; this way, the reporting process will be separated from the main ASSP process and won't slow it down ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Assp-test mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/assp-test
