Effective state machines for complex logic by David Khourshid (Effect Days 2024)

  Рет қаралды 3,481

Effect | TypeScript at Scale

Effect | TypeScript at Scale

Күн бұрын

Get Effect support from the community → / discord
David Khourshid discusses the use of state machines and the Effect library for handling complex logic in applications. He explains how state machines help make edge cases and use cases explicit and how the Effect library can be used for declaratively representing effects in state machines.
Highlights:
→ The benefits of using state machines for handling complex workflows; different types of effects in state machines, including actions and actors.
→ The importance of declarative representation and how it can be converted into diagrams.
→ The actor model and its role in state machines.
Slides: slides.com/davidkhourshid/eff...
_____________________________________
David Khourshid is the author of XState and founder of Stately.ai, a visual software modeling platform for app logic and workflows.
Learn more about and follow David:
X: / davidkpiano
Github: github.com/davidkpiano
_____________________________________
Effect is an ecosystem of tools to build better applications and libraries in TypeScript.
Website: effect.website/
Community: / discord
X (Twitter): / effectts_
Github: github.com/Effect-TS
_____________________________________
#Effect #TypeScript #XState #StateMachines #EffectDays #EffectDays2024

Пікірлер: 7
@Danielo515
@Danielo515 Ай бұрын
Effect video , instant like
@spaghettispaghetto
@spaghettispaghetto Ай бұрын
wao, it's effective
@ApprendreSansNecessite
@ApprendreSansNecessite Ай бұрын
This video is really explaining in a nutshell what a state machine and the actor model are. It is not very clear how Effect could be used in the context of XState and what it would change to the dev experience. It looks like Sandro Maglione is the person to look up for answers.
@seannewell397
@seannewell397 Ай бұрын
Thanks for the heads up
@nickr753
@nickr753 Ай бұрын
I think the idea is that both tools are good at modeling different things which happen to be complementary. i.e. if you use XState to model your state machine, you could still make use of something to model computation, or if you use Effect to model computation, you might still want something to help you model a state machine. To use them together, XState is tasked with guaranteeing that the state of your machine is always valid, and Effect is tasked with running the side-effects that occur as a result of transitioning between states. To elaborate on the slide at 27:11 illustrated by an architecture I’ve been hacking on, I’m using Effect-cli as the top-level framework for a CLI tool, and inside certain subcommands, I want to model their logic as a state machine to guarantee a certain dependency graph between different actions. Those actions are then implemented as Effects. The benefit of using XState is that you can visually model these statecharts instead of defining them strictly in code.
@ApprendreSansNecessite
@ApprendreSansNecessite Ай бұрын
@@nickr753 I guess I am used to the idea of having one entry point which is an effect and which is composed of effects, all the way down, but this setup is probably an exception rather than a rule. It just feels natural to me that an effects system is the framework.
@m23605
@m23605 16 күн бұрын
I've used this library before and it just kills productivity as it is full of gotchas and pitfalls (not to mention the boilerplate). Worth learning the idea of state machines but really, sum types (or discriminated unions if you prefer) are a more practical way of making illegal states unrepresentable. All the other bells and whistles xstate gives you over and above sum types have a very poor cost/benefit ratio.
Why Effect is more important than ZIO by John A. De Goes (Effect Days 2024)
33:42
Effect | TypeScript at Scale
Рет қаралды 8 М.
Effect: The Origin Story by Michael Arnaldi (Effect Days 2024)
33:45
Effect | TypeScript at Scale
Рет қаралды 1,1 М.
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 29 МЛН
Survival skills: A great idea with duct tape #survival #lifehacks #camping
00:27
Жайдарман | Туған күн 2024 | Алматы
2:22:55
Jaidarman OFFICIAL / JCI
Рет қаралды 1,4 МЛН
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 14 МЛН
Goodbye, useEffect - David Khourshid
29:59
BeJS
Рет қаралды 495 М.
Durable Workflows with Effect Cluster by Mattia Manzati (Effect Days 2024)
26:25
Effect | TypeScript at Scale
Рет қаралды 1,4 М.
Fix a memory leak in Flutter (#148291)  | Building Flutter
1:06:27
Flutter Bounty Hunters
Рет қаралды 1,4 М.
Solving the distributed schema problem with @effect/schema by Jess Martin (Effect Days 2024)
35:05
Next Generation TypeScript | Prime Reacts
24:45
ThePrimeTime
Рет қаралды 96 М.
Jake Bennett "State Machines" - Laracon US 2023 Nashville
28:12
Building backend workflows with Stately: Media scanning
19:41
Production-Grade TypeScript by Johannes Schickling (Effect Days 2024)
26:58
Effect | TypeScript at Scale
Рет қаралды 15 М.
Mastering React Context: Do you NEED a state manager?
37:26
Jack Herrington
Рет қаралды 97 М.
Ryan Dahl introduces JSR at DevWorld 2024
29:13
Deno
Рет қаралды 100 М.
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 1,9 МЛН
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1,4 МЛН
💅🏻Айфон vs Андроид🤮
0:20
Бутылочка
Рет қаралды 742 М.
Неразрушаемый смартфон
1:00
Status
Рет қаралды 2,1 МЛН