Why stateful services
The fastest queries are the ones you don't need to make
Stateless applications utilize significant resources, querying the same data over and over again. Nstream takes context queries off the critical performance path by keeping the state stored in application memory and proactively updating related state only when it changes.
- Store data where you use it
Access and modify real‑time state at memory-level latency (accessing RAM), which is over 1,000x faster than utilizing an in-memory database with stateless architectures.
- Freedom to import from any library
Import functionality from any library and have full freedom to run all types of business logic (not just analytics) in response to any state change unshackling you from the limitations of stream processing frameworks.
- Continuously evaluate and automate actions
Build a real-time model of your business that is continuously updating and taking actions to automate decision-making - reducing reliance on human intervention, thereby increasing the efficiency of your business.
What stateful services enable
Map all the relationships between real-world objects in your business
Traditional databases were built for documents and organized data. CRUD (Create Update Read Delete) applications were built on top of these traditional databases and designed primarily for ad-hoc information retrieval. Streaming data includes all types of data - documents, video, audio, etc. To take full advantage of streaming data and these new types of data, we need different data systems to build streaming data applications. These streaming data applications process continuously and take actions according to pre-defined business logic. Automate more of your business with software and have humans do higher-value tasks. Nstream helps you represent each real-world object in your business by a web agent and it keeps the web agents up to date by making them
- Universally addressable.
- Web Agents are addressed by URIs a globally unique identifier, enabling them to link together to any other web agents (real-world objects) in your business.
- Continuously operating.
- Web Agents remember their program state between operations, so they don't need to query a database every time they receive new data.
- The state of any Web Agent can be subscribed to by other web agents as well as any API client. These state changes are pushed instantaneously to all subscribers.
How stateful services work
Easily manage, update, and merge state changes across your business
Millions of Web Agents can run in a single SwimOS (a distributed operating system open-sourced in 2019) instance per compute node, scaling linearly with the size of the cluster.
- Virtual processes.
- SwimOS runs a virtual container for every web agent, ensuring that each web agent can perform processes independently, reduce interdependency, and enhance security.
- Consistent local state.
- Web Agents track program state & context in managed virtual files, and provide an ACID (Atomicity, Consistency, Isolation, Durability) guarantee. Keeping state and business logic (code for the program that it runs) together improves performance and reduces latency.
- Remembers shared state.
- Web Agents remember the states of other Web Agents they are linked to. Enabling you to merge states from multiple Web Agents - essentially performing stream-to-stream joins at scale with network-level latency.