Urgent.News

What's breaking now, across thousands of outlets.

Tech

Managing Complex Application State with Reactive Data Flows

Complex applications with large data flows can become challenging to manage. As the app grows, so does the complexity of rules that depend on derived values. External data flow in and out of the system, and keeping everything consistent while the user interacts with the UI presents a significant challenge.

However, a set of four components can simplify the problem. Datastar and Glimmer enable the creation of a reactive UI that reacts to changes in the data. Domino acts as a transactional data flow engine that encodes business logic. Ebb provides a clean method to coordinate data flows into and out of the system.

Ebb serves as a bridge between the internal and external data flows. It receives events from outside the system, transacts them in Domino where derived values are calculated, and then Glimmer drives the UI updates based on the resulting state. User input flows in the opposite direction, going from the UI into Domino, getting transacted, and triggering effects that flow out of the system through Ebb.

Ebb essentially functions as a service bus, providing access to external resources such as databases, APIs, email sending, and PDF generation that the application needs.

Despite being based on the Java ecosystem, a port of Missionary has been implemented in pure Clojure. This implementation, Ebb, improves upon the original by allowing functions to park at any call depth, not just at the lexical level. Missionary's core idea is to provide a library for supervised data flow programming where asynchronous effects can be treated as composable values.

The approach avoids memory leaks and state inconsistencies that are common in reactive software development. By linking the lifespan of resources to the period they are needed, it ensures strict boundaries around asynchronous event streams. This model prevents issues like orphaned websockets or zombie threads consuming system resources.

Missionary also uses a bidirectional flow protocol for backpressure management, allowing producer and consumer processes to negotiate and invalidate stale data before expensive recomputations. This model is particularly suitable for Domino, which manages the application's state. The document model in Domino tracks all fields associated with the application's data, and business logic is expressed as context-free functions attached to paths within the document.

When an event occurs, it is fed into the data flow engine, and rules are triggered that produce a new state of the document. Effects can then be triggered to pass data off to the flow layer managed by Ebb. This process can be visualized as an application being a state machine, where an event triggers a cascade of rules that eventually leads to a new state and triggers effects to update the UI.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at yogthos.net →

More in Tech

Why we moved our Backstage platform from Yarn to pnpm

What Git worktrees, parallel coding agents, and a cache pointing at the wrong directory taught us about the assumptions hiding inside node_modules .

  • Company migrated from Yarn to pnpm for Backstage platform
  • CI runs revealed cache issues causing each job to start from scratch
  • Optimizations reduced pnpm archive size by 72% and saved pipeline time

Why Static Mock APIs Aren't Enough for Modern Frontend Development

Every frontend developer has experienced this sequence: You start building an interactive web application. The backend is not yet ready, so you connect to a popular free mock API like JSONPlaceholder…

  • Static mock servers provide stateless echo responses.
  • Modern frontend development faces issues with static mocks.
  • Stateful session-based mocks preserve mutations across requests.

I Ship Mobile Apps for $0: Vercel + Render + Supabase Free Tier

TL;DR: My entire mobile stack costs $0 a month. Expo builds the app. Supabase holds data and auth. Render runs background jobs. Vercel hosts the landing page. Free tiers cover all of it.

  • Ship mobile app using Expo for app building and OTA updates
  • Host landing page on Vercel with 100GB bandwidth and SSL
  • Manage data and authentication with Supabase free tier

More from Saturday 12 September →