PubNub has introduced Functions, a new feature in their Data Stream Network that enables serverless computing by allowing code execution within the network itself, distributing it globally for efficiency and maintaining low-latency responses. Functions are built on Node.js virtual machines with the V8 JavaScript engine, ensuring security through restricted APIs and isolation using cgroups, which protect resources and data integrity. This feature includes a distributed key-value store for storing JSON-like objects with an eventually consistent data model, enabling continuous computation without synchronization delays. The system is designed to handle real-time messages efficiently by deploying code to multiple edge nodes worldwide, ensuring that messages are processed at the nearest data center, thereby reducing latency. Security is further enhanced with end-to-end encryption of sensitive payloads and the use of Access Manager APIs for channel-level access control, making Functions a robust tool for building real-time applications and services.