scheduled tasks - Handling embargoed content scenario in MarkLogic -
scheduled tasks - Handling embargoed content scenario in MarkLogic -
i have marklogic 7 database in several documents inserted , every document has own created-on
, released-on
. illustration if document inserted database @ 1400 hrs , released-on
value 1700 hrs need post document external rest service @ 1700 hrs.
i have tried next options:
configure cpf pipeline such whenever document inserted it's released-on
value read , scheduled task created trigger based on timestamp value read released-on
.
following queries/ observations approach:
since admin configuration manipulation apis not transactionally protected operations need forcefulness lock on uri in order create scheduled tasks within cpf action modules running in parallel. details read here
when insert 1000 documents takes around 20 minutes cpf action modules trigger , create 1000 scheduled tasks based on released-on
value read inserted document.
how can pass uri of document triggered cpf action module schedule task got created within cpf action module based on released-on
value read document?
configure cpf pipeline such whenever document inserted it's released-on
value read , xdmp:sleep()
called milliseconds remaining between current date time , value of released-on
in document.
following queries/ observations approach:
the task server threads on cpf action modules triggered remain occupied , not released when xdmp:sleep()
called within them due @ time cpf action module triggered 16 maximum documents , others remain in queue.
is there way can configure sleeping thread become inactive , allow other queued action modules triggered , when sleep duration has been elapsed 1 time again becomes active?
configure muti-step cpf pipeline described here in document keeps bouncing between 2 states till time released-on
timestamp has arrived.
following queries/ observations approach:
even when 30 documents inserted cpu utilization observed 100%in attempts lot of scheme resources (cpu , ram) utilized little 1000 documents. need find approach can cater 100k documents.
please allow me know in case there improvements can done in above mentioned approaches or marklogic provides other way efficiently handle such scenarios.
rather cpf, set scheduled job run, say, every 10 minutes , documents ready published. job documents released-on
values between fn:current-datetime()
, lastly time job ran, save in database.
for each of documents, spawn task post document, error in 1 doesn't cause problems others. after looping through, save current time in database next time.
the 10-minute window can big or little like, depending on tolerance little delay.
scheduled-tasks marklogic
Comments
Post a Comment