All project notes

Engineering

Serverless and managed services

Keep operations lean by matching serverless compute to when work arrives.

The cloud provider handles server provisioning and much of scaling. The SalesCandy team owns application behavior, failure handling, observability, and running costs.
Illustrative diagram

Lead submissions and scheduled reports arrive in bursts. We chose managed AWS services and serverless compute for v3 to keep operations lean and make use of startup credits. The reference diagram shows Lambda and DynamoDB among the building blocks for lead capture.

In 2019, SalesCandy co-founder Stanley Chee described a reason for the move to AWS serverless technology. It could “save on costs when our lead routing technology was not in use.” The Digital Enterprise interview, 2019

Reporting shows a different usage pattern from incoming leads. In Dodol/sc-rollups at a52c0bd, an hourly schedule started reporting and queues invoked the functions for each stage. Separate concurrency limits let the team control how much PDF generation and email delivery could run at once.

Serverless compute hands server provisioning and much of the scaling work to the provider. The team still owns application behavior, including what happens when a request fails, how to observe it, and what it costs to run. The diagram records the design choices. It supplies no measured cost comparison.

What carries forward

In an agent workflow today, a queue can start a bounded tool call and a durable workflow can wait for a tool result or human decision. Keep enough state to resume the pending step, and attach an execution ID to the outcome so someone can trace the decision later. For a sustained, latency-sensitive loop, compare a dedicated worker against event-triggered compute under realistic load. SalesCandy made that trade-off when matching moved into CarouselMatcher. AWS Step Functions callback pattern · The SalesCandy routing system.

Resource footprint

Reducing idle capacity is one way to pursue a smaller footprint. Start with a comparable unit such as a successfully routed lead or a completed agent task. Measure idle and burst compute, retry volume, concurrency, and the persistent stores that remain running while work waits. For an agent task, count model calls and tool calls, including retries, and measure their energy use where data is available. Keep completion quality and wait time visible so a system does not look leaner simply because it completes less work.

The Software Carbon Intensity specification combines operational and embodied emissions per functional unit. Apply the same system boundary to both designs, document measurement gaps, and use energy consumption and electricity carbon intensity when estimating operational emissions. SalesCandy’s archive records the cost and operations rationale. Historical energy use and emissions remain unmeasured. Software Carbon Intensity specification.

Historical sources: SalesCandy v3 reference architecture, October 2020 PDF export, and Reza’s firsthand design notes.