Readit News logoReadit News
abrgr commented on The Coming Need for Formal Specification   benjamincongdon.me/blog/2... · Posted by u/todsacerdoti
abrgr · 12 days ago
Great article!

> There exists a higher level problem of holistic system behavior verification

This is the key observation. Strict, code-level verification of every line, while valuable in the small, doesn't contribute very meaningfully to understanding or building confidence in higher level system properties.

I see a future of modules with well defined interfaces and associated contracts. Module level contracts can be formally verified or confidently believed via property based testing. Higher level system behavior can then be proven or tested by assuming the module contracts are upheld.

Module boundaries allow for varying the desired level of confidence module by module (testing, property based testing with variable run time allotments, formal verification).

LLMs can handle each step of that chain today, allowing humans to invest specifically where we want more confidence.

abrgr commented on The Workflow Pattern   blog.bittacklr.be/the-wor... · Posted by u/kiyanwang
abrgr · 2 years ago
Modeling workflows as state machines is incredibly powerful.

In addition to everything the author mentioned, the constraints of state machines allow a workflow platform to provide a ton of additional guarantees and capabilities around consistency, state propagation, reliable timers, inter-instance messaging, etc.

We built our workflow execution platform [1] around state machines and we've seen great results. We find our workflow code is incredibly simple and easy to understand.

[1] https://www.statebacked.dev

abrgr commented on Show HN: Symphony – Use GPT-4 to call functions in sequence   symphony.run/... · Posted by u/jrmyphlmn
abrgr · 2 years ago
This is really cool. Love to see usage of state machines on the backend!

It's such a good fit for multi-step LLM apps and a really nice abstraction for generic backend flows as well.

abrgr commented on Using enums to represent state in Rust   corrode.dev/blog/enums/... · Posted by u/bitshifta
abrgr · 2 years ago
Rust ADTs and pattern matching are so much better than other mainstream languages I find that once my code compiles it actually is almost always correct.

The next step is to encode your transition logic in the From impls between the enum structs and you've got yourself a first-rate state machine.

abrgr commented on Your backend should probably be a state machine   docs.statebacked.dev/blog... · Posted by u/abrgr
krebby · 2 years ago
Great post. I really like the idea of explicitly enumerating all state possibilities for a correctness guarantee. This seems spot on for how I want to think about distributed systems.

Am I right in assuming this solution is somewhere in between distributed tracing and Workflow definition, like event based programming, but the possible states are always strongly typed / defined?

I've also been thinking a lot about node-based programming, in a creative context. One piece I keep coming back to is that node trees are really helpful when the logic is straightforward, but can be a bit visually overwhelming for first timers when the logic is nontrivial or it generates complex artifacts as an output. Does State Backed support grouping nodes, a la Blender or Houdini? Or how do you think about information hiding for this type of thing? Looks like right now the nodes represent functions, so you don't have to think about what sendWelcomeEmail does, eg. How do you think about representing the state within that logic then?

abrgr · 2 years ago
Great points.

It's very similar to a DAG you'd make for a workflow but not necessarily acyclic and events can be sent from external sources as well as internal processes.

States can be grouped into parent states, which gives you some additional nice things like parallel states and also a totally reasonable way to zoom out and hide info in visualizations.

When you have a pure function or a single effect, that should definitely just be a function rather than its own machine. Sate machines are most useful for orchestrating those effectful functions and for situations where you want to accept external events. So you're still writing regular code but you're writing it in small functions that get invoked by the state machine as needed.

That is, state machines don't replace code. They're just a really nice way to organize it.

abrgr commented on Your backend should probably be a state machine   docs.statebacked.dev/blog... · Posted by u/abrgr
arunnagarajan · 2 years ago
state machines are a lost art and most of the issues that make it hard to grok for engineers is the lack of good debugging and visual tools. excited to try this out!
abrgr · 2 years ago
Very true!
abrgr commented on Your backend should probably be a state machine   docs.statebacked.dev/blog... · Posted by u/abrgr
griffinmyers · 2 years ago
We're still waiting for our "react" moment on the backend; a fundamental shift in the abstractions we treat as the bedrock of our applications.

I think the author does a good job here showing why the state machine might just be that abstraction.

abrgr · 2 years ago
Well put and thank you!
abrgr commented on Your backend should probably be a state machine   docs.statebacked.dev/blog... · Posted by u/abrgr
ian-gillis · 2 years ago
The systems available today (Temporal/Cadence/etc) definitely make a big mess of updating logic/code. This seems so obvious and yet I've not seen it done well -- excited to see where it goes!

Also my first time hearing of the Slemiel the painter algorithm (or at least first time hearing it described that way). Thanks for sharing

abrgr · 2 years ago
Thanks! Running systems with this pattern for the past few months, it has been so nice being able to cleanly upgrade instances.

The old Joel on Software blog has some gems.

u/abrgr

KarmaCake day62July 6, 2015
About
Building www.statebacked.dev - a state machine cloud for invincible workflows and real-time backends

[ my public key: https://keybase.io/abrgr; my proof: https://keybase.io/abrgr/sigs/l0nvygWetP5buv3Qtb18R9oMmIBOI_q9MNAUnFhlsHc ]

View Original