lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, 20 Jul 2023 08:58:06 +0200
bil til <biltil52@gmail.com> wrote:

> ... sorry if I am so insisting concerning seeing "practical examples".
> Can you describe one or two "direct use cases" in detail? Just to be
> sure that we can concentrate such discussion on the use cases and do
> not start "talking past each other"?

Two cases I've personally run into:

1. An experimental workflow processor: A Lua script controlled the
onboarding process for new customers. Basically Sales would start a
flow, which would handle tasks like setting up a customer account
number, define a billing cycle, specify and provision resources from
operations, etc. The parts that couldn't be done automatically (most at
the time) were sent to respective teams to sign off as complete. 

Each flow instance was a coroutine, which would pause waiting for the
human to respond. Since the entire SLA was upwards of a week, and a
crash and/or restart of the service would essentially delete all
incomplete workflows, it never made it to production. Being able to
save the coroutine to disk while paused would have saved the project.

2. I've used coroutines as the session state in several web
applications in the past. It works great for some cases, except then
the application server cannot be load balanced without sticky sessions.
And again a crash or restart zaps any users actively working.

-- 
Aaron B. <aaron@zadzmo.org>