https://airflow.apache.org/docs/apache-airflow/2.4.0/release...
Isn't that about as recently as Dagster?
y = Computed(lambda: calculate_y(x()))
How does this instance of Computed know that it depends on x? Does it parse the bytecode for the lambda? Does it call the lambda and observe which signals get accessed?In my homebrew signal framework, which emerged in the middle of a complicated web dashboard, this would look like:
y = Computed([x], calculate_y)
So the machinery gets to see the signal directly.Too magical for me. I'd rather have something like you described where inputs are explicit, so I don't have to guess about whether the magic will work in any given case.
Strongest was Cells[0], a library for Common Lisp CLOS. The earliest reference I can find is 2002[1], making it over 20 years old.
Second is incremental view maintenance systems like Feldera[2] or Materialize[3]. These use sophisticated theories (z-sets and differential dataflow) to apply efficient updates over sets of data, which generalizes the case of single variables.
The third thing I'm reminded of is Modelica[4], a language where variables are connected by relations (in the mathematical sense). So while A = B + C can update A on when B or C change, you also can update just A and B, then find out what C must have become.
[0] https://cells.common-lisp.dev
[1] https://web.archive.org/web/20021216222614/http://www.tilton...
How about Microsoft DirectAnimation[1] from 1998, literally designed under the direction of Conal Elliott? Serious question, for what it’s worth, I’ve always wondered if all discussions of this thing are lost to time or if nobody cared for it to begin with.
[1] http://sistemas.afgcoahuila.gob.mx/software/Visual%20Basic%2...
I've always been baffled that people think spreadsheets are like dataframes when the really interesting thing has always been you can write formulas that refer to each other and the engine figures out the updating. Most of the times I've written a spreadsheet I haven't used the grid as a grid but just a place I can write some labels, some input fields and formulas.
DAG-based workflows incur a cost in terms of complexity, but there are a few advantages to using DAGs instead of sequential.
1. Parallelism becomes inherently built-in
2. It's easier for a new developer to understand the direct dependencies of a node on other nodes (compared to sequential). Sometime in the future, a developer may want to split off a task or move it up/downstream of other tasks.
3. Fault tolerance & recovery becomes easier. Just because 1 step fails, doesn't mean that the whole workflow must come to a halt.
User caution or does e.g. this lib prevents cycles?
- Why so many lambda functions instead of regular named functions? Is it a technical limitation? Something important should have a name, for instance (for the example in the article) different ways to compute greetings from names.
- How are the computations ordered, particularly multiple Effects that trigger at the same change? For instance, in the example in the article, when the name changes the updated greeting is printed before or after the updated location.
The Signals evaluation are topologically ordered and are running synchronously. Effects are running in the order they are defined.
This feels like a lighter weight alternative to Temporal or other workflow tools[0], but eventually for a backend system you'd likely be rebuilding features that are tailored for the backend.
In frontend code, you have many side effects (e.g. DOM, styling) that rely on a single piece of data/event, and more side effects that rely on those side effects (e.g. component hierarchy), and having this laid out declaratively is one way to understand the behavior of an application when this piece of data changes. You are also almost never concerned about durability/persistence of the state of data on the frontend, just because the code interacts with the browser and we almost never question the reliability of that API. A human is typically the "driver" of these interactions and is typically in the loop for most interactions, so stuff that fails, e.g. a failed network call, can bubble up to the user to deal with.
Conversely, web backend projects have code and infrastructure that are distributed (even monolithic ones), and most of the time are concerned with persisting state/data, distributing/scheduling workloads, etc. Each side effect / computation, especially ones that cross networks/service, has its own requirements for whether it should be at least once/at most once, retried/retry patterns, latency/throughput, failure modes/error handling. These requirements also define your boundaries/interfaces, rather than a nice semantic and declarative one (not exclusive but oftentimes the requirements win out).
Not saying that this signal-based approach can't be used in some areas of the application would benefit for declarative computation, but the examples given seem to indicate also a desire to do distributed workflow stuff.
[0] https://temporal.io/, https://github.com/meirwah/awesome-workflow-engines
The performance hit from all that indirection of registering, getters, setters, discover, traversal, and lambdas could be avoided if we could compile the dag into smartly nested ifs
This allowed process definitions to remain simple enough for business analysts to comprehend while still able to cover real world complexity.
rikafurude21•17h ago
troupo•17h ago
- SolidJS (kickstarted the whole signals revolution)
- Svelte
- Preact (and Preact Signals)
- Well, even Angular got signals now
aquariusDue•17h ago
https://data-star.dev/
lbreakjai•15h ago
troupo•11h ago
They are all still pretty hampered by React's model: re-render (internally, in VDOM) the whole component on any minor change.
buibuibui•15h ago
jazzypants•17h ago
Signals are derived from Observables[2] which were first used in Adam Haile's S.JS[2] and made popular in JavaScriptLand by Ryan Carniato's SolidJS[3].
[1] - https://dev.to/this-is-learning/how-react-isn-t-reactive-and...
[2] - https://dev.to/this-is-learning/the-evolution-of-signals-in-...
[3] - https://www.solidjs.com/
[4] - https://github.com/adamhaile/S
WesolyKubeczek•14h ago
Are you sure it hadn't been, by chance, made popular even before by KnockoutJS?
troupo•11h ago
jazzypants•8h ago
jauco•14h ago
I can’t remember if at that point it was the first lib to uses observables.
jazzypants•8h ago
Thanks for the correction so that other people can learn!
Izkata•9h ago
yapyap•17h ago