Production-Grade TypeScript by Johannes Schickling (Effect Days 2024)

  Рет қаралды 15,360

Effect | TypeScript at Scale

Effect | TypeScript at Scale

3 ай бұрын

Get Effect support from the community → / discord
Effect is an ecosystem of tools to build better applications and libraries in TypeScript.
Website & docs: effect.website/
Community: / discord
X (Twitter): / effectts_
Github: github.com/Effect-TS
______________________________________
In the Effect Days 2024 Opening Keynote, Johannes Schickling talks about the challenges of building production-grade TypeScript apps and how the Effect library can help address these challenges.
Highlights:
→ Building production-grade TypeScript apps can be challenging and requires handling errors, retries, timeouts, and observability.
→ Effect is a set of primitives that helps build efficient TypeScript apps with a holistic standard library.
→ Effect provides maximum type safety, a great developer experience, and code composability, and can be used to build apps that run on various platforms.
Slides: 2024-effect-days-keynote.verc...
_____________________________________
Learn more about and follow Johannes:
X: / schickling
Github: github.com/schickling
_____________________________________
#EffectDays #Effect #TypeScript #EffectDays2024

Пікірлер: 25
@SoreBrain
@SoreBrain 3 ай бұрын
Enjoyed the talk, thanks yt algorithm!
@joaomendoncayt
@joaomendoncayt 3 ай бұрын
I've seen effect duzens of times before, this is the very thing that will make me try it out, be proud Johannes.
@JohnMcclaned
@JohnMcclaned 3 ай бұрын
We need a new effect 101 long form video about how to use it on this channel
@Danielo515
@Danielo515 3 ай бұрын
Probably better wait for them to reach stability first
@kevin41420
@kevin41420 3 ай бұрын
Errors as values! 🙌
@SoreBrain
@SoreBrain 3 ай бұрын
I'm curious how high the performance price is when using Effect in a large code base as it wasn't mentioned. Just like Prisma is able to be costly, I wonder where Effect lands on the spectrum in the context of a long living application.
@michaelarnaldi6680
@michaelarnaldi6680 3 ай бұрын
From a recent discord discussion: depends what you mean by performance, many times performance bottlenecks in JS are due to bad management of concurrency, thanks to structured concurrency and observability it becomes much easier to spot and optimize those issues. There are apps in frontend running at 120fps that use effect intensively, so most likely effect won't be your perf problem. In regards of memory, it doesn't use much more memory than a normal program would, there are a few more allocations compared to non effect code but usually this is no longer the case when the non effect code does the same thing as the effect code. The advise would be start using it and monitor your code, optimise out of need not out of thought, optimizing too early is the root of all evils in software design
@SoreBrain
@SoreBrain 3 ай бұрын
@@michaelarnaldi6680 Those are some interesting points, thank you.
@seannewell397
@seannewell397 3 ай бұрын
The Client is a distributed system in many ways, so making client apps fault tolerant already has a level of fault tolerant distributed systems as each client (browesr session) in the system has far more robustness. But I get your meaning - composing apps and workflows and services with the TS Compiler. Having this with SST would be huge. Curious if something like how figma operate or Linear with their real time collab could be "effect"-wrapped (ie an Effect-TS version of real time collab)
@thiagoalmeida5437
@thiagoalmeida5437 3 ай бұрын
Great talk, kudos to the presenter. How does effect differs from rxjs though?
@sebastiansiemssen223
@sebastiansiemssen223 3 ай бұрын
RxJs is first and foremost "just" Observables. Effect offers streams but that's just a teeny tiny group of modules in relative terms when compared to the scope of Effect which is a full blown effect system, standard library, schema encoding&decoding, dependency injection, etc. etc. etc. (the list goes on and on).
@very_unique_username
@very_unique_username 3 ай бұрын
Nevermind, this is pretty cool :) -I'm trying to read the code at --13:10-- and I have so many questions right now. Now granted, I don't have any experience with Effect (although I'd like to try it), but this code doesn't look elegant nor readable to me. The way I read this pipeline: so, we're constructing a GET request pipeline, then run "fetchOk" through it (which I'd assume actually does the fetch and checks the response status after), then I retrieve body from the response as JSON, and after that... do timeout and retry again? I understand the concept, these timeouts and retries only run when fetchOk pipe fails, but there is too much implicit magic happening.-
@michaelarnaldi6680
@michaelarnaldi6680 3 ай бұрын
It's so unintelligible that without having wrote a single line of Effect code you correctly understood what it does :) (ofc learning to write it is a different task, it is like learning anything new, think of learning React for example). I think the main issue here is understanding of "pipe" (normal as it is not a standard) that is function composition, so a.pipe(f, g) is g(f(a)),. In the code snippet everything but the first line is a Higher Order Function that modifies the behaviour of the original effect, in short, line-by-line: 1) creates a request 2) declare that we are interested in the success response and we want to fail otherwise 3) after the response is successful we want to extract the json of the body 4) declare that we want to timeout after 1 second 5) in case of failures we want to retry using an exponential backoff policy 6) we want to instrument the call with an opentelemetry span named getTodo with attributes Note that Effect is lazy, meaning just invoking that function won't do anything, only when executed effects actually occur, so you can change behaviour such as saying "hey, for this code I want it wrapped in a try-catch and want to print the error" or really any other kind of behaviour change, think of it like templating a program rather than issuing a sequence of instruction. The same code without Effect is about 200 lines and it is almost impossible to understand what is going on when reading it.
@very_unique_username
@very_unique_username 3 ай бұрын
@@michaelarnaldi6680 I'm starting to get it now, thank you. Looking at pipelines the "Elixir" way really cleared up any confussion that I've had with this snippet, looking forward to trying out Effect!
@levibaraka
@levibaraka 3 ай бұрын
Pipe reminds me of rxjs and my angular days 😂
@xoutaku7600
@xoutaku7600 3 ай бұрын
looks more like a framework to write ts , i see this as something like nest rather than a utility library
@michaelarnaldi6680
@michaelarnaldi6680 3 ай бұрын
Given that you can use it even for small parts of an app it is more akin to a library, that said if you use it for everything it can feel like a framework
@vpetryniak
@vpetryniak 3 ай бұрын
Bro, you forgot validation in the beginning, how can you be sure that endpoint returns data in shape that your app expects, so add another 20 lines to those 83. Zod is a good way to validate data
@sebastiansiemssen223
@sebastiansiemssen223 3 ай бұрын
Effect has `@effect/schema` for this instead of Zod.
@ivan.jeremic
@ivan.jeremic 2 ай бұрын
You didn't watch the video carefully, the slide even says you don't need zod.
@s4ndeep1203
@s4ndeep1203 3 ай бұрын
I don't see mentions of Nuxt and Vue in the framework logos, are these not compatible with effect?
@michaelarnaldi6680
@michaelarnaldi6680 3 ай бұрын
They are compatible indeed, we have production users of both, Effect runs everywhere that JS runs. I guess the reason logos weren't there is just because of space
@trejohnson7677
@trejohnson7677 2 ай бұрын
where da production-grade typescript examples at lol? you just landed decent documentation? k then.
@sebastiansiemssen223
@sebastiansiemssen223 3 ай бұрын
It should be illegal to be this handsome.
@michaelarnaldi6680
@michaelarnaldi6680 3 ай бұрын
LOL
Effective state machines for complex logic by David Khourshid (Effect Days 2024)
30:05
Effect | TypeScript at Scale
Рет қаралды 3,5 М.
Solving the distributed schema problem with @effect/schema by Jess Martin (Effect Days 2024)
35:05
She ruined my dominos! 😭 Cool train tool helps me #gadget
00:40
Go Gizmo!
Рет қаралды 64 МЛН
Must-have gadget for every toilet! 🤩 #gadget
00:27
GiGaZoom
Рет қаралды 12 МЛН
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 8 МЛН
Testcontainers have forever changed the way I write tests
12:11
Dreams of Code
Рет қаралды 111 М.
Next Generation TypeScript | Prime Reacts
24:45
ThePrimeTime
Рет қаралды 96 М.
Floating UI Svelte announcement!
18:48
Skeleton Labs
Рет қаралды 9 М.
How To Not Suck At Design For Developers
14:23
Joy of Code
Рет қаралды 80 М.
Effect's Latest and Greatest by Tim Smart (Effect Days 2024)
30:10
Effect | TypeScript at Scale
Рет қаралды 2,4 М.
Theo should use Effect
13:15
Ethan Niser
Рет қаралды 32 М.
Dependency Injection | Prime Reacts
28:34
ThePrimeTime
Рет қаралды 303 М.
TypeScript 5.5 is a BANGER
9:16
Matt Pocock
Рет қаралды 59 М.
Игровой Комп с Авито за 4500р
1:00
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,8 МЛН
Choose a phone for your mom
0:20
ChooseGift
Рет қаралды 1,9 МЛН
Secret Wireless charger 😱 #shorts
0:28
Mr DegrEE
Рет қаралды 2,4 МЛН