Comment by _jackdk_

1 day ago

That is not a use cases I would've expected Step Functions to handle; I'm intrigued. You're using express ones, I assume, but how are you wiring them up and why?

API Gateway direct integration to Step Functions. Unlike Lambda, there is not automatic transform for requests so I just wrote one and copy/paste it to each method integration (via a preprocess script; one of the ugly bits). Yes, EXPRESS state machines. I’ve found they have better tail latency behavior, and of course they involve zero patching/dependency updates which is nice.

The state machines use JSONata for the sweet, sweet power vs JSONPath. Generally I have a Parallel state that splits the different parts of the page and Map states for data driven repetition (usually some data pulled from DDB). I have a simple JSONata method for replacing placeholder values (aka data binding). Zero Lambda at the cost of come copy paste.

I’m not unhappy with it despite the warts.

  • Thanks for replying, that's an interesting architecture. The idea of using a high-up parallel state seems particularly neat as a way to ensure every part of the page render stays independent, and to burst up the compute serving the response.