Contributor
Vivek Agrawal

Revolutionizing the Tasks API


Mentors
Richard Tibbles, Jonathan Boiser
Organization
Learning Equality

Kolibri has a Tasks API that runs time consuming tasks asynchronously outside of HTTP request / response cycle hence unblocking the HTTP connection for other requests.

The current Tasks API backend has a very poor consumer experience. Adding new tasks require plugin developers to inherit from kolibri.core.tasks.api.BaseTaskAPIViewset class which adds in multiple extra endpoints for handling of this new task.

The current architecture makes it a tiring experience for plugin developers to submit and monitor their custom tasks. It also disturbs the core Tasks API code and has heavily polluted kolibri.core.tasks.api module.

This project fully revolutionizes the Tasks API backend.

This project aims to make it super straightforward for plugin developers to submit, monitor and manage custom asynchronous tasks with a simplified backend architecture.

The result is:

  • Plugin developers can submit any custom task by POSTing to just one endpoint.
  • Plugin developers can manage and monitor their tasks via specific and consistent endpoints.

And most importantly, this makes the Tasks API super duper easy to work with.