Why stateful services
The fastest queries are the ones you don't have to make
Stateless applications expend significant resources querying the same data over and over again. Nstream takes context queries off the critical performance path by keeping state resident in application memory, and proactively updating related state whenever it changes.
- Optimal data locality
Access and modify real‑time state 1,000x faster than the physics-limited speed of stateless architectures.
- General purpose compute
Run arbitrary business logic in respons to any state change, with complete contuinity of program state between operations.
- Closed-loop automation
Follow along with reality as it unfolds, continually adapting to feedback from multiple sources.
What stateful services enable
A web of agents
The World Wide Web was built for documents. But real-time applications model processes, not documents. This mismatch is the root cause of complexity and inefficiency that has held back streaming application development. Nstream solves the heart of the problem by turning passive Web Resources into active Web Agents.
- Universally addressable.
- Web Agents are addressed by URIs, enabling them to link together across domains into a world wide web of point-to-point streams.
- Continuously operating.
- Web Agents remember their program state between operations, so they don't need to query a database every time they wake up.
- The state of any remote Web Agent can be materialized locally, and synchronized continuously so that the latest data is always available.
How stateful services work
A distributed operating system
Nstream builds on SwimOS, a distributed microkernel for executing large numbers of virtual compute processes. Millions of Web Agents can run in a single SwimOS kernel process per compute node, scaling linearly with the size of the cluster.
- Virtual processes.
- Nstream runs a virtual container for each and every application entity, keeping state and code together for optimal performance and latency.
- Resident local state.
- Web Agents track program state and context in managed virtual files, called lanes. Updating local lanes is atomic and consistent.
- Coherent shared state.
- Web Agents can link to the lanes of other agents. Locally cached views of remotely linked states are accessible with memory latency.