35:07 Right after finishing the video, I noticed that the connectionAckLatch is a bit overkill. It's simpler to just define a function that takes in the connectionTimeout and registers the handlers - you can find the updated code in the description.
You make the best effect videos. Very direct to the point, explaining every concept, fixing concrete problems... Wow man, absolutely impressive. How much are you liking the new Service interface? To me it couples the type too much to one particular implementation, and to me the point of services and dependency injection is to be able to swap implementations. Also I find confusing that, by default, streams are recreated on every subscription. Keep up the good work
Thanks so much! I'm really liking Service. Removes a lot of the boilerplate. But from what I can see, the general consensus is: - Effect.Service if you need a primary implementation - Context.Tag for multiple implementations that don't need a default implementation (like the use case you pointed out) As for streams, it makes sense. Streams being recreated by default gives you pure functional composition. After all, each pipeline represents a blueprint of operations, not a shared execution - a source without a Stream.share is just a piece to expand from. Stream.merge might suggest sharing, but each brand represents an independent processing pipeline. I suppose merging simply describes how to combine outputs, not how to manage the source.
Great video! I discovered my love for Effect thanks to your content. Appreciate it, man! Could you guide me on where to find more resources about Effect?
Thanks! I'll be releasing a course on Effect soon. In the meantime, you can check out my other videos. I recommend taking a look at public repositories too - there are plenty available in the official Discord.
It uses timeoutFail which fails with a Cause.TimeoutException. This error gets propagated and caught by the parent fiber with the retry policy: effect.website/play#0f5938930086
Oh, just realized you were asking about the "connection_ack" one. At that point, it won't be retried, clearly... Haha. That policy is added here: 38:24
Can we Please have this version of web socket in react best practice using "zod" instead of "effect" as It would be informative for the masses. I don't have knowledge about effect. By the way loved your content.
35:07 Right after finishing the video, I noticed that the connectionAckLatch is a bit overkill. It's simpler to just define a function that takes in the connectionTimeout and registers the handlers - you can find the updated code in the description.
One of the most insightful Effect videos I've seen so far. Subscribed and liked, thanks for awesome job
Awesome, thank you!
Great video! I fell in love with Effect thanks to your videos. Thank you man!
Happy to hear that!
Awesome video, as always! Love your effect content
You make the best effect videos. Very direct to the point, explaining every concept, fixing concrete problems... Wow man, absolutely impressive.
How much are you liking the new Service interface? To me it couples the type too much to one particular implementation, and to me the point of services and dependency injection is to be able to swap implementations. Also I find confusing that, by default, streams are recreated on every subscription.
Keep up the good work
Thanks so much!
I'm really liking Service. Removes a lot of the boilerplate. But from what I can see, the general consensus is:
- Effect.Service if you need a primary implementation
- Context.Tag for multiple implementations that don't need a default implementation (like the use case you pointed out)
As for streams, it makes sense. Streams being recreated by default gives you pure functional composition. After all, each pipeline represents a blueprint of operations, not a shared execution - a source without a Stream.share is just a piece to expand from.
Stream.merge might suggest sharing, but each brand represents an independent processing pipeline. I suppose merging simply describes how to combine outputs, not how to manage the source.
Good work man
Great video! I discovered my love for Effect thanks to your content. Appreciate it, man! Could you guide me on where to find more resources about Effect?
Thanks! I'll be releasing a course on Effect soon. In the meantime, you can check out my other videos. I recommend taking a look at public repositories too - there are plenty available in the official Discord.
21:17 I don't understand how failing on the Ack stream will make everything retry, including re-creating the websocket connection
It uses timeoutFail which fails with a Cause.TimeoutException. This error gets propagated and caught by the parent fiber with the retry policy: effect.website/play#0f5938930086
Oh, just realized you were asking about the "connection_ack" one. At that point, it won't be retried, clearly... Haha. That policy is added here: 38:24
Can we Please have this version of web socket in react best practice using "zod" instead of "effect" as It would be informative for the masses. I don't have knowledge about effect. By the way loved your content.
Effect handles all this very elegantly. Building it without would mean more code, more edge cases, and more headaches. Not really worth it.
wow Nice!