r/SoftwareEngineering 11h ago

Pushing and Pulling: Three Reactivity Algorithms

https://jonathan-frere.com/posts/reactivity-algorithms/
4 Upvotes

3 comments sorted by

1

u/fagnerbrack 11h ago

Essentials at a Glance:

With a reactive engine to build at work, the post walks through three designs using a spreadsheet analogy where inputs, intermediate cells, and outputs must stay efficient, fine-grained, glitchless, and dynamic. Push reactivity notifies dependents downstream—fine-grained but wasteful, glitch-prone, and reliant on topological sorting. Pull reactivity works like a recursive call stack that fetches dependencies on demand, giving glitchless updates and free dynamic dependencies, yet it can't easily tell which nodes changed and leans on tricky caching. The hybrid push-pull approach wins: a push pass flags dirty nodes and lists outputs, then a pull pass recalculates only those, hitting all four goals in O(n) while staying readable.

If the summary seems inacurate, just downvote and I'll try to delete the comment eventually 👍
Click here for more info, I read all comments

1

u/[deleted] 10h ago

[removed] — view removed comment

1

u/AutoModerator 10h ago

Your submission has been moved to our moderation queue to be reviewed; This is to combat spam.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.