The Information System: State, Context, and Views
State: What You Own
// Basic state access
const orderNode = createNode("order-service");
// Read state directly
const state = orderNode.state.get();
const pendingOrders = Object.values(state.orders || {})
.filter(order => order.status === "pending");
// Transform state using a function approach
orderNode.state.set(state => {
return {
...state,
orders: {
...state.orders,
"order-123": {
customerId: "cust-456",
items: [{productId: "prod-789", quantity: 2}],
status: "pending"
}
}
};
});Global State Implementation
Context: What Happened and Why
Views: Windows Into Other Nodes
The Unified Information System
How These Systems Work Together
Context + Views
State + Context = Causal State History
State + Views = System-Wide View
Practical Example: Coordinated Operations
Last updated