[MarkLogic Dev General] ML: Task Server Persistence Issue
dlee at epocrates.com
Mon Mar 8 08:28:38 PST 2010
Is there a way to kick off a task at server start automatically which could check this "state" ?
From: general-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com] On Behalf Of Wayne Feick
Sent: Monday, March 08, 2010 10:50 AM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] ML: Task Server Persistence Issue
That is correct, and is the intended behavior. If you need guaranteed execution, you may want to learn more by reading the Content Processing Framework (CPF) documentation. At a high level, CPF is a state machine implementation that allows you to add xquery main modules that act upon documents. The CPF framework ensures that your processing happens even if there is a server restart.
If CPF does not address your needs, I recommend you write state to a database to track what processing needs to happen, and look at the database online event as a way to reinitiate processing after a server restart.
On Mon, 2010-03-08 at 05:40 -0800, SinghDang, Balvinder (ELS-OXF) wrote:
We are currently developing an application for storing XML Content in ML database, and noticed couple of issues
Task Persistence Issue: Tasks queued in the Task Server do not seem to survive a server restart. This behaviour is in contrast to JMS servers that usually provide multiple persistence options (file journal, database etc).
Graceful Shutdown Issue: During a server shutdown, tasks being executed by Task Server at that point (in the 4 threads) “may” not complete execution. We checked this using a Task that takes 10sec (we used the sleep API) to execute. ML server shuts down in about 4 secs. We noticed that the entry into the task was logged, but the exit from the task was not logged - suggesting that the task started execution but did not complete it.
Just wanted to check, if there is a recommended workaround from MarkLogic to achieve message persistence? Any workaround that any of you would have used in any of the projects.
Any help is greatly appreciated.
Elsevier Limited. Registered Office: The Boulevard, Langford Lane, Kidlington, Oxford, OX5 1GB, United Kingdom, Registration No. 1982084 (England and Wales).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the General