As we go on in our pursuit to use Joomla in never-seen-before use cases a few interesting problems came forth.
- A web-hooks implementation: Similar to how plugins can declare triggers they want to listen to, webhooks allow external applications to register URLs that can receive a JSON payload when an action happens in an application. Since there could be multiple webhooks, each webhook call is queued as a message and happens asynchronously.
- In Shika: Recalculating user progress in the background. When a new lesson is added to a course, Shika recalculates each enrolled user’s progress to take into account the newly added lesson. When there are a lot of lessons and a large number of users enrolled in the course, this recalculation cannot happen in real time. In this case, a recalculation job does this in the background once the lesson is saved.