Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Step functions have a lot of good use cases - strong guarantees, concurrent, distributed, good at recovery in all the right ways. It's a terrific queueing layer abstraction for complex business processes. I suspect there are a lot of businesses out there with adhoc state machine definitions in queue workers that would benefit from formalization.

I had a closed-source proof of concept for a little framework for building these in Python while at a former employer that worked out pretty neat. The gist was arranging / building them more in pure code and automatically generating/deploying lambda tasks and state machine.

    @task(name='foo')
    def some_lambda(input):
        ....
    
    state_machine = StateMachine(
      {...define_some_steps}
    )
then it was able to take advantage of Zappa to immutable deploy steps as lambdas and build new state machine definitions with a little bit of python magic. Was pretty nifty and not particularly tricky to make it work.

Amazon would do really well releasing a maintained open-source lib / docker container that would be able to emulate state machines locally. The definition language is pretty simple, but it's something that you definitely want to be able to test end-to-end. I at one point did a little PoC for that bit too (https://github.com/bpicolo/local-step-functions).

The one big miss for me in step functions right now is that Tasks can't just POST to an HTTP endpoint for request/response to take advantage of existing infrastructure/http services easily. That'd be a real killer feature. They're currently distributed in nature requiring lambdas or polling daemons, which is powerful but also requires a lot of operational / configuration / deployment overhead where a simpler model would suffice for many use cases - seems like there's no reason you shouldn't be able to just deploy a monolith and get a lot of use out of step functions in that regard. There are ways you could sort of shim it with lambdas but the overhead is pretty high to do that (you'd need to carry / edit routes in the task data which would ruin the declarative nature of task definitions)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: