All project notes

Engineering

Schedules and queues for reporting

SalesCandy used an hourly trigger and separate queues for rollups, PDF generation, and email.

An hourly schedule started the reporting pipeline. Separate SQS queues handed work to the statistics rollup, PDF generation, and email functions.
Illustrative diagram

In sc-rollups, an hourly schedule invoked the function that kicked off processing for each tenant. The service then used separate SQS queues to trigger statistics rollups, PDF generation, and email delivery. Each queue had its own Lambda consumer, and the service set concurrency separately for each consumer. The configuration could cap PDF generation and email delivery independently while the reporting work waited in its respective queue.

SalesCandy Git evidence — Dodol/sc-rollups at a52c0bd (27 September 2022), serverless.yml. Lambda events