Tarearbol - a lightweight task manager (now allows subscriptions to task results)

Tarearbol is a lightweight task manager, allowing retries, callbacks, assurance that the task succeeded, and more.

Starting with version 0.8.1 it married Envío to make it drastically easy to subscribe to task processing callbacks via Registry with pub_sub.

http://rocket-science.ru/hacking/2018/08/03/tarearbol-now-allows-subscriptions

9 Likes

Version update. Tarearbol gets DynamicManager to ease building the collections of supervised workers with a similar behaviours, e. g. watchers for different changing entities.

  • Scaffold for the supervised DynamicSupervisor
  • No code for managing processes required
  • Implementation is as easy as 4 callbacks
  • Extremely easy testing
  • Behaviour-driven consumers
  • Consistent state and callbacks on state changes (like restarting)

Implementation details and flow diagram.

5 Likes

Interesting! How would you compare Tarearbol with other existing task managing libraries?

This package does not compete with other [known to me] task management libraries. Most of known to me libraries deal mostly with task queues (like https://github.com/akira/exq and family) and/or alternative supervisions (like https://github.com/PSPDFKit-labs/sidetask.)

Tarearbol does none of the above.

Since yesterday it has two unrelated parts. The old one is a very thin wrapper around standard Task, reducing a boilerplate when one needs to deal with often-occasionally-failing tasks (retries, error handling, logging, etc.) plus it brings its own Supervisor. It was done mostly to eliminate the necessity to copy-paste boilerplate.

The part I introduced yesterday is actually not about tasks, but rather about DynamicSupervisor with many no-so-long living children. It has no analogs AFAIK. It drastically simplifies dealing with DynamicSupervisor when the workers are undefined upfront, have a defined lifecycle and might increase thousands in a number. It also makes testing DynamicSupervisor with children a charm.

2 Likes

New updates.

v0.13.1 includes lightweight cron scheduler fully based on spawn processes. Allows conditional job termination, rescheduling, keeps track of last execution outcome.

Zero boilerplate is required.

Comes with cron record parser, returning all the upcoming events as Stream, Tarearbol.Calendar.{beginning_of,end_of}/2 working properly with any calendar (not only Calendar.ISO.)

1 Like

If anyone is wondering if this library is dead, I can see it as released v1.3.0 on 4 March 2021(2 days ago):

Releases · am-kantox/tarearbol · GitHub

1 Like

I am finishing some improvements in the dynamic management part and will publish an update as soon as it’s done.

1 Like

https://elixirforum.com/t/beam-threads-on-devtalk/33142/153?u=mudasobwa

1 Like