Liking cljdoc? Tell your friends :D

verbo.sokka

Background task management library for Clojure.

Background task management library for Clojure.
raw docstring

verbo.sokka.ctrl

protocol and a default implementation of a control that enables multiple threads to co-ordinate life cycle events, like termination (close), kill (abort) and timeout.

protocol and a default implementation of a `control` that enables
multiple threads to co-ordinate life cycle events, like
termination (close), kill (abort) and timeout.
raw docstring

verbo.sokka.supervisor

Monitors running and snoozed tasks and revokes the lease of tasks whose lease has expired. Locking implementations in distributed systems are prone to issues caused by clock skew. A process with skewed time can cause the active and valid lease held by other processes to be revoked. This can cause thrashing of tasks and results in the same task being attempted to run multiple times wasting system resources and delaying sucessful task execution. This issue can be resolved by maintaining an in memory list of tasks with active lease and a projected expiry time based on the current time of the process/instance. If the task still has the same record version after the expiry, it is considered stale and its lease is forcefully revoked freeing it up to be reserved again. The projected expiry time calculated based on the current time (for running tasks, it is current time + lease time, and for snoozed tasks it is current time + snooze time). The cleanup-leased-tasks! function implements a mark-sweep pattern, where the state of leased tasks are updated in an agent during the 'mark' stage and the expired tasks are revoked in the 'sweep' state.

Monitors running and snoozed tasks and revokes the lease of tasks
whose lease has expired. Locking implementations in distributed
systems are prone to issues caused by clock skew. A process with
skewed time can cause the active and valid lease held by other
processes to be revoked. This can cause thrashing of tasks and
results in the same task being attempted to run multiple times
wasting system resources and delaying sucessful task execution. This
issue can be resolved by maintaining an in memory list of tasks with
active lease and a projected expiry time based on the current time
of the process/instance. If the task still has the same record
version after the expiry, it is considered stale and its lease is
forcefully revoked freeing it up to be reserved again. The projected
expiry time calculated based on the current time (for running tasks,
it is current time + lease time, and for snoozed tasks it is current
time + snooze time). The `cleanup-leased-tasks!` function implements
a mark-sweep pattern, where the state of leased tasks are updated in
an agent during the 'mark' stage and the expired tasks are revoked
in the 'sweep' state.
raw docstring

verbo.sokka.task

Protocols and constants to implement a task queue.

Protocols and constants to implement a task queue.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close