The serverless revolution, led by platforms like AWS Lambda and Azure Functions, changed the game for developers. The promise was simple yet profound: write your code, deploy it, and never worry about managing a server again. This paradigm of Function as a Service (FaaS) unlocked incredible scalability and cost-efficiency, allowing us to build event-driven applications with ease.
But as serverless architectures have matured, a new, more complex challenge has emerged. We have collections of isolated, independent functions, but how do we make them work together to execute meaningful business processes? The answer often involves complex orchestration tools, brittle "glue code," and a frustrating lack of visibility.
This is where the paradigm needs to shift. The future isn't just about serverless functions; it's about composable business logic. It's about moving from writing code to building automated services.
A typical serverless application often looks like a series of disconnected functions. You might have one function to process a user signup, another to handle a file upload, and a third to send an email notification.
While powerful, this model presents several inherent challenges:
function.do takes the core benefit of serverless—executing code on-demand—and elevates it to a new level. It reframes the concept from executing isolated functions to building with atomic, composable business logic.
On the .do platform, your code isn't just a function; it's an Agent—a discoverable, versioned, and reusable building block that encapsulates a single-purpose piece of business logic.
Think of our OrderCalculator example:
import { Agent, property } from '@do-sdk/core';
// Define the structure for a line item in an order
interface LineItem {
  productId: string;
  quantity: number;
  unitPrice: number;
}
// Create an agent that encapsulates the 'calculateOrderTotal' function
export class OrderCalculator extends Agent {
  
  @property()
  async calculateOrderTotal(
    items: LineItem[], 
    taxRate: number
  ): Promise<{ subtotal: number; tax: number; total: number }> {
    
    // Calculate the subtotal from the items
    const subtotal = items.reduce(
      (acc, item) => acc + item.quantity * item.unitPrice, 0
    );
    // Calculate tax and the final total
    const tax = subtotal * taxRate;
    const total = subtotal + tax;
    // Return the detailed breakdown
    return { subtotal, tax, total };
  }
}
This isn't just a snippet of TypeScript. When deployed to .do, it becomes a standalone, executable Business Logic API endpoint. It's an atomic function that does one thing perfectly: calculate an order total. It's versioned, discoverable, and ready to be composed.
The true magic happens when you start building Composable Workflows. Because every function on the .do platform is a first-class, callable agent, building complex services becomes as simple as assembling LEGO bricks.
Imagine an e-commerce order fulfillment process. Instead of a monolithic service or a complex state machine, you compose a workflow from simple, atomic functions:
On the .do platform, one function can directly and easily invoke another. This native composability means you build powerful workflows by piecing together simple, independent, and reusable units of logic. You're not just calling functions; you're constructing a service chain that perfectly mirrors your business process.
Shifting your focus from individual serverless functions to a composable business logic architecture delivers transformative benefits.
Serverless functions provided the engine. Now, it's time for a steering wheel.
While traditional FaaS solved the infrastructure problem, it left the bigger challenge of business logic orchestration on the table. function.do addresses this head-on by providing a platform built for composition. It treats your business logic as the valuable, reusable asset it is.
Don't settle for a disconnected collection of functions. Start building with atomic, composable services and unlock infinite possibilities for automation and innovation.