Service Functions

Stateless, event-driven functions that execute business logic instantly without cold starts. Deploy with a single command, scale automatically, and run in isolated micro-VMs with enterprise-grade security.

Try Service Functions View Documentation

What Are Service Functions?

Message-Driven Architecture

Service functions are persistent, event-driven computational units that respond to MQTT messages. Unlike traditional serverless functions that cold start on demand, service functions run as sleeping containers subscribed to message topics, enabling instant execution without delays.

When messages arrive, functions execute immediately with full context including validated user identity, pre-configured platform interfaces, and automatic parameter extraction from client session state.

Hardware-Level Isolation

Each service function runs in isolated Kata QEMU micro-VMs, providing superior security boundaries compared to traditional container approaches. This hardware-level isolation ensures complete separation between functions while maintaining high performance.

Functions automatically receive validated OIDC user context, pre-configured authorization interfaces, and built-in audit logging, eliminating the need for custom security integration while ensuring enterprise-grade protection.

Developer Experience

Creating a service function is as simple as writing a native language class method. Generate a JSON schema, deploy with a single command, and the platform handles all infrastructure concerns including messaging, scaling, security, and monitoring.

Functions maintain natural language constructs while the platform translates them into optimized, scalable services with built-in real-time capabilities and cross-platform compatibility.

Key Features

Zero Cold Starts

Functions run as persistent sleeping containers, subscribed to MQTT topics for instant activation without initialization delays.

🔄

Automatic Scaling

Platform automatically scales function instances based on message volume and processing requirements without manual configuration.

🛡️

Built-in Security

Every function execution includes validated user context, authorization interfaces, and automatic audit logging for compliance.

🎯

Single Command Deployment

Deploy functions with one command - the platform handles container creation, messaging setup, and service registration automatically.

🔗

Integrated Messaging

Functions naturally integrate with MQTT messaging infrastructure for real-time updates, collaboration, and event-driven workflows.

📊

Unified Monitoring

Complete observability with performance metrics, error tracking, and distributed tracing built into the platform foundation.

Simple Function Example

Create a service function in any supported language (.NET, Node.js, Python, Go, Java)

C# Service Function Example
// Simple user management service function
public class UserService
{
    private readonly IDataStore dataStore;
    private readonly IMessaging messaging;
    
    // Function automatically receives user context and platform interfaces
    public async Task<CreateUserResponse> CreateUser(CreateUserRequest request)
    {
        // Validate user has permission
        if (!UserContext.HasRole("admin"))
            throw new UnauthorizedException();
            
        // Create user in database
        var userId = await dataStore.Insert("users", request);
        
        // Send real-time UI update
        await messaging.Send($"ui/change/{UserContext.UserId}", 
            new { type = "user_created", userId });
            
        return new CreateUserResponse { UserId = userId, Success = true };
    }
}

Deploy: platform deploy UserService

Service Function Benefits

Measured improvements compared to traditional approaches

70%

Faster Development

Reduction in feature development time

90%

Less Integration Work

Elimination of API configuration overhead

<5ms

Response Time

Sub-millisecond function activation

100%

Security Coverage

Built-in authorization and audit logging

Ready to Build with Service Functions?

Experience the simplicity of message-driven development with enterprise-grade security and performance

Start Building Technical Documentation