workflows icon indicating copy to clipboard operation
workflows copied to clipboard

XState V5 [currently Alpha]

Open guy-borderless opened this issue 2 years ago • 4 comments

Feature request

The next version of xstate (V5) seems geared towards server environments, so it might be an ergonomic (and OSS) approach to supabase workflows. Some things I'd like to put in my shopping cart:

  1. ensured edge functions compatibility
  2. actor.send() resolution to a machine stored in supabase
  3. viewing a workflow persisted to a JSONB field in supabase ui using the xstate visualizer
  4. cron / delayed transitions built-in
  5. automatic logging / events table I can subscribe to / subscribing to specific machine events from the supabase client

guy-borderless avatar Jan 18 '23 12:01 guy-borderless

server environments

interesting. Do you know if they will be building a multi-tenant runtime? (eg, serve multiple customers with a single server)

That's our typical constraint at supabase - it's very hard to host a server per customer now

kiwicopple avatar Feb 09 '23 08:02 kiwicopple

multi-tenant runtime

So I suppose normally splitting schemas is enough, not in your case right?

guy-borderless avatar Feb 10 '23 13:02 guy-borderless

that's a start (generally it would be a different database for security reasons though, and with supabase that config would live inside their database)

the trick here is that the server needs to hold open a connection to thousands of databases, and Node isn't great for that sort of thing (compared to, say, elixir). Then you get spiky workloads, noisy neighbors, excecution isolation, etc.

it's not impossible, but we'd need to make sure it's an explicit goal of XState (which I doubt many people will be asking for)

kiwicopple avatar Feb 10 '23 16:02 kiwicopple

This is an interesting integration of Xstate and temporal https://github.com/Devessier/temporal-electronic-signature

guy-borderless avatar Feb 14 '23 10:02 guy-borderless