Serverless functions, like AWS Lambda or Google Cloud Functions, have fundamentally changed how we build and deploy applications. They offer incredible scalability and a pay-per-use model that frees developers from server management. For event-driven tasks and simple data transformations, they are a phenomenal tool.
But when you stitch these functions together to represent a core business process—like an order fulfillment pipeline or a customer onboarding sequence—a new set of challenges emerges. You find yourself writing extensive "glue code" to handle retries, state management, orchestration, and error logging. The business logic gets lost in a sea of infrastructure code.
This is precisely where the architecture of the .do platform offers a superior alternative. It’s not about replacing serverless technology, but about providing a higher-level abstraction designed specifically for business logic: the Atomic Action. Let's explore why action.do is a more powerful primitive for building robust, scalable, and agentic workflows.
A serverless function is, at its core, just a piece of code that runs in response to a trigger. While powerful, this model presents inherent challenges when modeling business logic:
action.do reimagines the fundamental unit of work. As its name implies, it represents a single, atomic action—an indivisible task that either succeeds completely or fails gracefully. It's not just a function call; it's a managed service.
Think of it like a database transaction, but for your business operations. An action.do call to email.send or database.update is a declarative statement of intent. The .do platform handles the rest.
import { Do } from '@do-sdk/core';
// Initialize the .do client with your API key
const doClient = new Do({ apiKey: 'YOUR_API_KEY' });
// Execute a single, atomic action like sending an email
async function sendWelcomeEmail(to: string, name: string) {
try {
const result = await doClient.action('email.send').run({
to,
subject: `Welcome to our platform, ${name}! Robustly.`,
body: `Hi ${name},\n\nWe're thrilled to have you join us.`
});
console.log('Action Succeeded:', result.id);
return result;
} catch (error) {
console.error('Action Failed:', error);
}
}
// Trigger the action
sendWelcomeEmail('new.user@example.com', 'Alex');
The line doClient.action('email.send').run({...}) is more than a function call. It's an invocation of a managed service that comes with a suite of enterprise-grade features out of the box.
Let's break down the critical advantages of action.do for your core business logic.
Serverless functions are an essential part of the modern cloud landscape. They excel at running isolated pieces of code in response to events.
However, when it comes to orchestrating end-to-end business processes, you need a higher level of abstraction—one that understands concepts like failure, retries, and business intent.
action.do provides that abstraction. By elevating every function to a managed, atomic, and resilient service, the .do platform allows you to move beyond executing code and start executing precise business actions. You spend less time wrestling with infrastructure and more time building reliable, scalable, and intelligent workflows that power your business.