Skip to content

Conversation

makasim
Copy link
Owner

@makasim makasim commented Jul 19, 2025

Distributed Flow Execution Support

This PR introduces the foundation for building distributed computing networks using flowstate.

Each node in the network can advertise the flows it owns (see SetFlow). What's particularly elegant is that there's no need for a separate API or service for discovery — advertising is done through the same state commit mechanism. It's recursion all the way down.

Other nodes observe these flow states (see watchFlows) and update their local registries accordingly. When a flow is invoked (see netflow.Flow), the call is routed directly to the node that owns the flow. The coordinator is only used for advertisement (see SetFlow, UnsetFlow, watchFlows), not execution.

This approach allows flows to be dynamically added and removed.

🔍 The most interesting part of the code is here: https://github.com/makasim/flowstate/pull/85/files#diff-eb98dc8149917fa74f4e8f21baa0e3d514ae300b65714f6627e2b09626a8a93fR125

Depends on #84

@makasim makasim merged commit ba5f2cc into main Jul 19, 2025
3 checks passed
@makasim makasim deleted the netflow branch July 19, 2025 14:26
makasim added a commit that referenced this pull request Jul 19, 2025
for case where flow has not been yet synced.

follow up on #85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant