- 83
- 155 625
Effect | TypeScript at Scale
United States
Приєднався 26 бер 2020
Production-Grade TypeScript - An ecosystem of tools to build better applications and libraries in TypeScript.
Effect is a TypeScript library that allows to easily build typesafe, resilient, and scalable applications, providing features such as error handling, validation, retry logic, structured concurrency, and observability.
→ Effect provides first-class support for type-safe errors and validation. It allows for the handling of temporary network failures with retry logic.
→ Observability is made easy with support for open telemetry.
→ The comprehensive effect ecosystem offers a wide range of modules and frameworks for various needs.
Effect is a TypeScript library that allows to easily build typesafe, resilient, and scalable applications, providing features such as error handling, validation, retry logic, structured concurrency, and observability.
→ Effect provides first-class support for type-safe errors and validation. It allows for the handling of temporary network failures with retry logic.
→ Observability is made easy with support for open telemetry.
→ The comprehensive effect ecosystem offers a wide range of modules and frameworks for various needs.
Effect Development: Building an Effect Warehouse App #4
Get Effect support from the Effect community → discord.gg/effect-ts
______________________________________
Effect is an ecosystem of tools to build production-grade applications in TypeScript.
Website & docs: effect.website/
Community & support: discord.gg/effect-ts
Follow us on X (Twitter): EffectTS_
Github: github.com/Effect-TS
______________________________________
#Effect #TypeScript #TypeScriptLibrary
______________________________________
Effect is an ecosystem of tools to build production-grade applications in TypeScript.
Website & docs: effect.website/
Community & support: discord.gg/effect-ts
Follow us on X (Twitter): EffectTS_
Github: github.com/Effect-TS
______________________________________
#Effect #TypeScript #TypeScriptLibrary
Переглядів: 255
Відео
Effect Development: Building an Effect Warehouse App #3
Переглядів 450День тому
Get Effect support from the Effect community → discord.gg/effect-ts Effect is an ecosystem of tools to build production-grade applications in TypeScript. Website & docs: effect.website/ Community & support: discord.gg/effect-ts Follow us on X (Twitter): EffectTS_ Github: github.com/Effect-TS #Effect #TypeScript #TypeScriptLibrary
Re-building Contentlayer with Effect (Part 7)
Переглядів 261День тому
Get Effect support from the Effect community → discord.gg/effect-ts Watch full playlist: ua-cam.com/play/PLDf3uQLaK2B8OagJfQpsbIghPjM4UVEbo.html Focusing on improving source plugins and metadata handling for content management. In this series, we reimagine how Contentlayer (contentlayer.dev/) should work to optimize our usage of it in effect.website/. We aim to use the latest and greatest of Ef...
Effect Development: Building an Effect Warehouse App #2
Переглядів 71514 днів тому
Get Effect support from the Effect community → discord.gg/effect-ts Effect is an ecosystem of tools to build production-grade applications in TypeScript. Website & docs: effect.website/ Community & support: discord.gg/effect-ts Follow us on X (Twitter): EffectTS_ Github: github.com/Effect-TS #Effect #TypeScript #TypeScriptLibrary
Effect Development: Second revision of HTTP API
Переглядів 41521 день тому
Get Effect support from the Effect community → discord.gg/effect-ts Effect is an ecosystem of tools to build production-grade applications in TypeScript. Website & docs: effect.website/ Community & support: discord.gg/effect-ts Follow us on X (Twitter): EffectTS_ Github: github.com/Effect-TS #Effect #TypeScript #TypeScriptLibrary #Contentlayer
Effect Development - Building an Effect Warehouse App #1
Переглядів 2,4 тис.21 день тому
Get Effect support from the community → discord.gg/effect-ts Effect is an ecosystem of tools to build production-grade applications in TypeScript. Website & docs: effect.website/ Community & support: discord.gg/effect-ts Follow us on X (Twitter): EffectTS_ Github: github.com/Effect-TS #Effect #TypeScript #TypeScriptLibrary
Effect Development - Learning to Use STM
Переглядів 80828 днів тому
Get Effect support from the community → discord.gg/effect-ts Effect is an ecosystem of tools to build better applications and libraries in TypeScript. Website & docs: effect.website/ Community & support: discord.gg/effect-ts Follow us on X (Twitter): EffectTS_ Github: github.com/Effect-TS #Effect #TypeScript #TypeScriptLibrary
Effect Cluster - Design Sync Session (Part 7)
Переглядів 232Місяць тому
Get Effect support from the community → discord.gg/effect-ts Watch the full playlist: ua-cam.com/play/PLDf3uQLaK2B80ptTY3yZXe5mN8p-eMgS_.html The Effect Cluster is a cluster-sharding framework integrated into Effect. It was initially inspired by shardcake and evolved to support more reliable communication and durable computing, and Mattia Manzati ( MattiaManzati) has been a driving f...
Reimagining Contentlayer with Effect (Part 6)
Переглядів 279Місяць тому
Get Effect support from the community → discord.gg/effect-ts Watch full playlist: ua-cam.com/play/PLDf3uQLaK2B8OagJfQpsbIghPjM4UVEbo.html In this series, we reimagine how Contentlayer (contentlayer.dev/) should work to optimize our usage of it in effect.website/. We aim to use the latest and greatest of Effect to make content processing deeply parallel and efficient. Contentlayer was one of the...
Re-building Contentlayer with Effect (Part 5)
Переглядів 412Місяць тому
Get Effect support from the community → discord.gg/effect-ts Watch full playlist: ua-cam.com/play/PLDf3uQLaK2B8OagJfQpsbIghPjM4UVEbo.html In this series, we reimagine how Contentlayer (contentlayer.dev/) should work to optimize our usage of it in effect.website/. We aim to use the latest and greatest of Effect to make content processing deeply parallel and efficient. Contentlayer was one of the...
Effect Cluster Development - Re-Thinking the Entity Manager
Переглядів 355Місяць тому
Get Effect support from the community → discord.gg/effect-ts Watch the full playlist: ua-cam.com/play/PLDf3uQLaK2B80ptTY3yZXe5mN8p-eMgS_.html Effect is an ecosystem of tools to build better applications and libraries in TypeScript. Website & docs: effect.website/ Community & support: discord.gg/effect-ts Follow us on X (Twitter): EffectTS_ Github: github.com/Effect-TS #Effect #TypeS...
Effect Cluster - Design Sync Session (Part 6)
Переглядів 290Місяць тому
Get Effect support from the community → discord.gg/effect-ts Watch the full playlist: ua-cam.com/play/PLDf3uQLaK2B80ptTY3yZXe5mN8p-eMgS_.html The Effect Cluster is a cluster-sharding framework integrated into Effect. It was initially inspired by shardcake and evolved to support more reliable communication and durable computing, and Mattia Manzati ( MattiaManzati) has been a driving f...
Effect Cluster - Design Sync Session (Part 5)
Переглядів 2612 місяці тому
Get Effect support from the community → discord.gg/effect-ts The Effect Cluster is a cluster-sharding framework integrated into Effect. It was initially inspired by shardcake and evolved to support more reliable communication and durable computing, and Mattia Manzati ( MattiaManzati) has been a driving force behind the project. This video is part of the design sync sessions of Effect...
Effect Cluster - Design Sync Session (Part 4)
Переглядів 3262 місяці тому
Get Effect support from the community → discord.gg/effect-ts Watch the full playlist: ua-cam.com/play/PLDf3uQLaK2B80ptTY3yZXe5mN8p-eMgS_.html The Effect Cluster is a cluster-sharding framework integrated into Effect. It was initially inspired by shardcake and evolved to support more reliable communication and durable computing, and Mattia Manzati ( MattiaManzati) has been a driving f...
Effect Cluster - Design Sync Session (Part 3)
Переглядів 2452 місяці тому
Get Effect support from the community → discord.gg/effect-ts Watch the full playlist: ua-cam.com/play/PLDf3uQLaK2B80ptTY3yZXe5mN8p-eMgS_.html The Effect Cluster is a cluster-sharding framework integrated into Effect. It was initially inspired by shardcake and evolved to support more reliable communication and durable computing, and Mattia Manzati ( MattiaManzati) has been a driving f...
Reimagining Contentlayer with Effect (Part 4)
Переглядів 3402 місяці тому
Reimagining Contentlayer with Effect (Part 4)
Effect Cluster - Design Sync Session (Part 2)
Переглядів 3033 місяці тому
Effect Cluster - Design Sync Session (Part 2)
Reimagining Contentlayer with Effect (Part 3)
Переглядів 3563 місяці тому
Reimagining Contentlayer with Effect (Part 3)
Effect Cluster - Design Sync Session (Part 1)
Переглядів 1,4 тис.3 місяці тому
Effect Cluster - Design Sync Session (Part 1)
Reimagining Contentlayer with Effect (Part 2)
Переглядів 5913 місяці тому
Reimagining Contentlayer with Effect (Part 2)
Reimagining Contentlayer with Effect (Part 1)
Переглядів 1,3 тис.4 місяці тому
Reimagining Contentlayer with Effect (Part 1)
Effect Cluster | Cleanup over cluster examples by Mattia Manzati
Переглядів 6314 місяці тому
Effect Cluster | Cleanup over cluster examples by Mattia Manzati
Effect: The Origin Story by Michael Arnaldi (Effect Days 2024)
Переглядів 2,2 тис.5 місяців тому
Effect: The Origin Story by Michael Arnaldi (Effect Days 2024)
Discriminated Unions in TypeScript, Effect, and ArkType by David Blass (Effect Days 2024)
Переглядів 2,1 тис.5 місяців тому
Discriminated Unions in TypeScript, Effect, and ArkType by David Blass (Effect Days 2024)
Effect CLI - A love letter to developers tired of settling for less by Max Brown (Effect Days 2024)
Переглядів 3,4 тис.5 місяців тому
Effect CLI - A love letter to developers tired of settling for less by Max Brown (Effect Days 2024)
Building type-safe REST APIs powered by @effect/schema by Anna DevMiner (Effect Days 2024)
Переглядів 3 тис.5 місяців тому
Building type-safe REST APIs powered by @effect/schema by Anna DevMiner (Effect Days 2024)
Effect Cluster | Integrating Effect RPC (Part 2) by Mattia Manzati
Переглядів 4175 місяців тому
Effect Cluster | Integrating Effect RPC (Part 2) by Mattia Manzati
Next level type safety with Effect by Aleksandra Sikora (Effect Days 2024)
Переглядів 4,3 тис.5 місяців тому
Next level type safety with Effect by Aleksandra Sikora (Effect Days 2024)
Durable Workflows with Effect Cluster by Mattia Manzati (Effect Days 2024)
Переглядів 2,2 тис.6 місяців тому
Durable Workflows with Effect Cluster by Mattia Manzati (Effect Days 2024)
Seems like a step in the right direction. I'll definitely try it in my next project
Relying entirely on effect feels limiting in some cases. It would be much more helpful to see an express/adonis-based project gradually transitioning to effect step by step.
It's a choice, one could decide to incrementally start adopting effect (and just for some parts of the code where it makes more sense), or decide to start an entire new project using mainly effect (like we do on the streams); both are valid options and mainly depends on your scope, situation, and use case :)
@@mattiamanzati_ I mean, seeing examples where the mindset isn’t entirely shaped around effect would be far more useful for me. Note: I edited the main comment to make it clearer.
If this is an example project for the public, it would be better to use something like Drizzle or some other tool to do the SQL. Personally, I feel that using effect/sql directly defeats a lot of the purpose of Effect which is to keep everything typed correctly, including errors. Just an opinion, nice video :D
Using effect/sql and considering the database like any external data source your app can access doing encoding + decoding with schemas is 100x safer and more type safe than using a "type-safe" query builder and trusting the database is in any particular shape. We will at some point work on a query builder on top of schema which does encoding/decoding under the hood but we don't have a huge priority on it, most of us actually prefer writing plain SQL
@@michaelarnaldi6680 An Effect Query Builder would be absolutely awesome! Totally get not wanting to rely on the drizzle shape alone-we do the same and run our drizzle responses through a validator to avoid headaches. I mentioned it because I’ve lost count of how many times I’ve typed something like "user_id" when it should’ve been "userId" or something else entirely. Might just be a skill issue on my part, though!
2:42:27 for the Scope.extend portion, couldn’t you just wrap each scoped effect in Effect.scoped? Why would that be different than the example? Or is this just showing that it splits scope into separate requirements that would have to be closed with scope.close for each some time in the program?
With Scope.extend you provide an existing Scope to an Effect, you don't automatically close such Scope. With Effect.scoped a new Scope is created, provided to the Effect and then closed once the Effect finishes.
Is the code anywhere online to be found? I would like to take a closer look at that.
Same, would love to take a look at it interactively in my own editor
I see all this boilerplate code and my Redux PTSD triggers immediately
looks like redux because Mattia is doing DDD, nothing to do with Effect per se, it's an architectural choice (that one may or may not like)
95% of this video is about XState and the only time the Effect is used, it is when wrapping one-line code in Effect.sync and immediately running it with Effect.runSync, which is no better than just running the same code directly . I'd wish for a better example that shows where Effect shines. For example a basic error handling and how we can then branch out to a specific error state in XState.
excelent content! thanks!
Hi, another question is why you use imports like import * as Schema from "effect/Schema". I've almost always seen it as import { Schema } from "effect". Is it more of a habit?
Yes it is more an habit and code style that nowadays has no real needs. Back in the days when dead code elimination was dumb it was necessary to avoid bundling unnecessary modules. Nowadays bundler are smart. So no real need for that anymore!
@@mattiamanzati_ are you sure about that or is it just your assumption? I have tried building js bundles using esbuild and different import expressions. but this one 716.3kb import { Schema } from "effect" but this import produces 414.9kb import * as Schema from "effect/Schema"
@@alexdev6403 I have not checked lately, but recent tooling should properly handle dead code elimination
@@mattiamanzati_ as long as I know tree shaking is a difficult task for bundlers
Do you plan on making the code examples public? Would be nice if we could follow there
Hi, is there any particular reason why you are using symbols for IDs instead of Branded Types? Great video btw :D
Hey there! No specific reason at all, you could use branded types as well!
Neat, thanks. And thanks for the zoom 😃
“Real world examples” - a high schooler I kid. Well, only partially. And lovingly.
A high-schooler who is one of the most knowledgeable programmers out there and that during summer break interns at YC-backed companies redefining their whole stack. Ageism is a form of discrimination!
Great presentation, i want to learn more, but is that LIGHT theme!?
Looking forward to part 2 🤗
Awesome i know nothing of effect
All the DDD parts are really a great bonus
I think I've learned more about how to use Effect Schema from this one video than I ever did from reading documentation and watching all the other videos on Effect that I could find.
awesome stream!
More of this please! This is super helpful for someone trying to pick up Effect and see how it's used in actual applications.
Hello, excellent content to learn a lot about the ecosystem. Will this project be continued?
Wow! This is awesome, the videos on this channel are so informative! Thank you! I'm slowly starting to understand Effect as I watch these videos more and more.
Excelent content
Ideally the IDE font should be at least 1.25 times bigger for comfortable reading for those streaming this on mobile.
can you please make a Real world example, i dont get how to implement this 😢
17:30 -- it is exactly a problem of Effect. You need all requirements, but declare that you need any of them ...
To declare that you need "any of them" means declaring a service which is a union in its shape. Totally doable.
@@michaelarnaldi9112 Actually I don't need to declare "any of". The problem of Effect is that, the "updateEmail" function depends on ALL services. But it's result defition declares that it depends on any of the services. It is semantically incorrect.
@@dimitro.cardellini it's not because it is a phantom type encoded covariantly.
@michaelarnaldi9112 why is it phantom? It is a Reader type, and it is explicite. It just confuses )
@@dimitro.cardellini it's not a reader type it's an index type, both `Console | Http` and `Console & Http` are not existent (phantom) they are basically representing just an index (the required list of services) and in TS intersections can lead to reduction to `never` so it's not smart to encode phantom types contravariantly mixing them with & which leaves us with a covariant phantom that mixes with |, not too unlike Map<Key, Value> where Key is covariant.
Can you clarify what else I need to watch before this?
You can watch the full playlist here: ua-cam.com/play/PLDf3uQLaK2B8OagJfQpsbIghPjM4UVEbo.html&feature=shared
I'm sure people running the sound love it when you call them 'yo'. :(
excellent content!
This could work for a small percentage of projects where there is only one super-smart dev, but once you add another (not super-smart) dev in the equation, the onboarding process becomes unsustainable. I tried giving Effect a try, but it does not enforce patterns enough for my liking. It's still wild-west JavaScript, in my opinion (P.S.: Albeit not as bare-bones as vanilla JS, of course).
Effect is currently being used in some pretty large and "average" teams, in fact at the next meetup we have a talk about a new developer being on boarded in an effect codebase talking about how good it is
@@michaelarnaldi9112 interesting, I'll reconsider my statement, then.
I rarely comment on UA-cam videos, but I have to say that it helped me a lot in a way that it gives numerous examples and real use cases along with some exercises. I got stumbled into Effect recently and found that it's really interesting, but there're so much stuff that I should get familiar with and the documentation was quite overwhelming at first glance. Now I have a nice reference where I can find some of the best practices when I'm stuck, and it gives me enough confidence to write my own code. For those who felt overwhelmed or got stuck, I highly recommend to clone his workshop repo and take a look at it. By the way I worked as an Android developer few years ago, though I'm backend now, this whole movement that Effect community makes reminds me how Kotlin ecosystem got evolved. One of the most favorable thing was the structured concurrency that coroutine provides. I'm glad that Effect also has those cool stuff and since those concepts were already proven in many other languages, I'm sure that it will gonna draw more attentions as it evolves.
I am 1 hour in and I already have so much more clarity than I did reading the docs. Thanks man!
19:22 Updating/patching long-running workflows in a testable way, and without turning your code into spaghetti, is the most difficult and important problem to solve. For a slight improvement to the single version mechanism shown here, see Temporal's patched and deprecatedPatch functions.
26:19 re. innovation, I see this as more of an obligation than a strategy to win. If you build on the work of predecessors, then you can "repay" this debt to prior innovation by asking new questions and making new mistakes so others can build on your work.
Integration with TRPC and Nextjs would be amazing
27:00 put mysql to its place :throw-in-trash:
I would love to get rid of MySQL but 1 process per connection really makes Postgres not scalable beyond a certain limit
@@michaelarnaldi6680 maybe both are not the right tool for a queue with insane scalability
@@tobiaslins find a better tool when such queue needs atomicity, consistency, isolation and durability :) also the issue isn't scaling the queue the queue is only basically used for insert and it's not used for in-flight query as we know location of an entity within the cluster so the message can be directly dispatched to the entity, the queue from db is only queried upon rebalance. The primary issue is that all pods have to be connected to the DB, and it is assumed that each pod has a pool of connections so if your cluster is 100 pods and each pod has 10 connections you'd end up with 1000 connections that are just fine for a MySQL but would kill a PG.
The stringly typing of CatchTag shows the drawbacks of a bolted on type system. If you refactor your name of an error these ones are hard to fix…
It's not stringly typed, it's literal typed which means if you change a tag all the places where you used such literal will error, and a single search&replace can fix the issue in a second. Power of TS :)
What an awesome presentation. The kid rocks
react-query + @effect/rpc + nextjs when?
🎯 Key points for quick navigation: 00:00:04 *🎥 Introduction to the Stream and Project Overview* - Discussing the idea to stream the project in public, - Introducing Contentlayer, a tool built by Johannes Schickling, and explaining why it needs to be reimagined. 00:02:22 *🚀 Project Setup and Initial Goals* - Overview of the setup for the project, starting from a basic, stripped-down version, - Highlighting the focus on improving build performance and exploring Contentlayer's current functionality. 00:04:10 *📜 Deep Dive into Contentlayer's Functionality* - Explanation of Contentlayer’s role as a content SDK, validating and transforming static assets, - Discussion on the structure of documents in Contentlayer and how they map to website content. 00:07:20 *🧩 Document Types and User Experience* - Description of how document types are defined and used in Contentlayer, - Insight into the user experience with MDX and Markdown, and the process of generating and validating documents. 00:12:26 *🛠️ Challenges and Missed Opportunities in Contentlayer* - Discussion on potential improvements, including adding support for multiple sources, - Exploration of how effect schema could enhance Contentlayer’s document specification and validation. 00:16:43 *⚙️ Reimagining Contentlayer with Effect* - Ideas for integrating deeply parallel processing and more flexible document sourcing, - Thoughts on leveraging Effect Schema and making Contentlayer more concurrent and extensible. 00:19:24 *🔍 Contentlayer Caching and Further Enhancements* - Overview of Contentlayer’s caching mechanism and suggestions for making it more modular, - Discussion of how to use Effect's key-value store for more efficient caching in the reimagined tool. 00:21:37 *💻 Transition to Coding and Implementation* - Wrapping up the discussion on Contentlayer’s current state and moving on to code implementation, - Initial thoughts on preserving the positive aspects of the user experience in the new version. 00:27:10 *🔄 Schema Design Discussion* - Discussing whether fields should always be treated as a struct or a different schema type, - Consideration of the flexibility and benefits of struct-like fields in schema design. 00:30:26 *🧩 Computed Fields and Schema Transformation* - Exploring how computed fields could be incorporated into a schema, - The possibility of using schema transformations to simplify field definition. 00:34:41 *📄 Content Layer Document Type Handling* - Discussion on how content layer processes document types and retains schema information, - Deciding the best approach to typing fields in a content layer to maintain clarity and utility. 00:40:02 *🔍 Invariance, Covariance, and Contravariance Explanation* - Explanation of type variance concepts and their application in TypeScript, - Discussing the impact of type variance on function assignability and type safety. 00:47:22 *📝 Computed Fields Implementation Strategy* - Deliberating the order of execution for computed fields and the potential need for sequential vs. parallel processing, - Considerations for allowing user control over the context available during field computation. 01:01:06 *🧠 Type Restrictions & Schema Design* - Discussing how to restrict the effect returned by `resolve` to the schema's return type. - Considerations on merging fields and computed fields in the document type. 01:05:19 *🔄 Schema Transformation & Field Handling* - Exploring ways to handle field transformations within a schema. - Considerations on how to avoid field name collisions using TypeScript generics. 01:10:09 *🚧 Handling Duplicated Fields in Computed Fields* - Creating a check mechanism for duplicated field names within computed fields. - Discussing the use of conditional types to manage key distribution and collision. 01:22:09 *🗂️ Document Source Metadata & Type Display* - Adding metadata about document sources and ensuring this is visible in the type display. - Considering user experience when interacting with document types in the content layer. 01:29:30 *🛠️ API Design & User Experience* - Finalizing thoughts on API design and the importance of user experience in effect libraries. - Discussing the potential for a class-based API for better type opacity and optimization.
I wonder how it compares with express in terms of performance? (Im not a BE dev btw) For a backend framework it looks really cool.. I just wished the js ecosystem focused on fixing existing popular frameworks than building new ones every 2 years For fullstack frameworks I'd still go with Nuxt (check it out first before replying)
We have an effect-native http server that is about 1.5x faster than express, Effect is much more than an http framework, in fact it can be seen as a new paradigm for general purpose programming so while I share your sentiment that JS world loves to reinvent the wheel instead of fixing the existing Effect is a totally different thing that doesn't have a predecessor
Love contentLayer, can't wait to see what happens with it. P.S. I also repeatedly highlight text when talking about it, it's good to know I'm not alone.
Good stuff as always Also you can simplify the check for common keys by doing `keyof (T | U)`
Thanks a lot for these videos!
Such an enlightening discussion! More of this please! Also, couldn't find the docs for Effect Cluster. Is it still in the making? Or maybe I missed finding it?
It is still in the making, focusing on user api design right now:)
Thank you for this series! Please keep the amazing content coming :)