
Infra Architect @ ByteDance. Maintainer of @webpack @rspack_dev - creator of #ModuleFederation #auADHD #synesthesia own opinions.
San Jose, CA
Joined June 2018
- Tweets35K
- Following767
- Followers19.5K
- Likes13.6K
Replying to @yagiznizipli
Bro makes fastest url parser and rewrites twitter, but the feat of choc chip cookies is another realm. ❤️
1
204
10tb failed a few months ago
Now my 6tb just started failing.
They were consumer grade disks I pulled from external housings.
Never again will I buy consumer storage. My replacements are enterprise disks. Even my NVMe drives are all enterprise now.
Replying to @Jefftopia_ @theo
Same origin policy also painful. Especially when enterprises like banks etc can take years to change their infra. Federation has been great at fitting into existing systems and deploy shapes. Next.js tanstack react router. Vite webpack rspack turbopack etc who all support it. It’s a pita to maintain these systems and most teams are not staffed well enough to take on the burden of a custom system and accompanying meta framework etc
1
38
Replying to @Jefftopia_ @theo
Yeah that makes sense. The main idea with federation was you just import stuff and it works. The issue I’ve had with solutions before federation existed was you had to build the whole system for it specifically. When I just wanted to import the meganav across the company and it work. Especially because in just about all cases. People wanted to pass a function as a prop to a remote module. Which just can’t be done via serialized stores and / or you end up with a global storage layer again where it’s easy to make data collisions or find teams cross depending on data in the store that could be removed (lessons from redux)
So I used atomic state machines which required importing to use and provided more explicit consumption that could be traced.
Everything is about tradeoffs I suppose haha
19
Replying to @Jefftopia_ @theo
The issue I have with web fragments is it’s not possible to share state afik. Like I can’t share react context and have it cascade down an application. While I agree that there can be some footguns in my approach - federation was more or less designed with the idea of a polylith many builds act as one at runtime. I understand this method isn’t for everyone tho.
1
24
Replying to @Jefftopia_ @theo
Dynamic federation always tricky. But many cases you can use a runtime plugin to add the “dynamic” feel to a static import. Depending on how dynamic it needs to be. Many cases users want dynamic but mean they just wanna switch the url etc. full dynamic is tricky. Not sure it’s possible if there’s no way to know who consumes what anywhere in the pipeline. If you know that A can consume BCDEF at some point. Or if there’s a backend who assigns this dynamically. Then it’s possible. We would just need some source of truth that can be queried to fill in the information that isn’t the users browser sending consumption patterns back to the backend at runtime. We primarily use dynamic federation. But it’s controlled by a backend. So we can query the backend directly and the tree shaker can see what relationships are set and can then shake the parts that are shared. We then have something similar to semver sharing in federation but it’s semver+export availability so the system can resolve to chunks that both meet the version needs and the available exports the connected applications require as well. At compile time we shake the share chunks based on what we can know at build time, and produce an additional unshaken chunk just in case there drift and user uses static system only. In addition we have a service you can deploy where it can read living systems and asynchronously produce shaken shares for that specific combination, they then add one additional remote that comes from this service. When that remote is available a runtimeplugin tells federation apps to prefer consuming shares from that remote - who just produces exact shaken shared modules on demand. This lets us avoid massive fleets requiring redeployment to optimize the system again. Dynamic could function similar to how we do typescript type sharing for dynamic federation in dev mode. The runtime sends the missing info back to dev server who then syncs the types it can’t see statically. But I have scaling concerns of doing something like that in production envs where every user is sending this back from their client, something like 1 trillion additional requests sending that info back a day. Since a server controls the dynamic mf tho, we can just derive it from that, it’s also what generates the lockfile snapshots which make prod immutable so that federation is guaranteed to behave the same way every time for every user. Like I can share react. But whose vending it if everyone can provide it? The system was designed to be flexible and resilient, but drawback was anyone can vend it when we would like to say “react comes from the host always” or whatever and it repeatedly will behave the same way till the lockfile issues a new change for a new region etc.
30
Replying to @Jefftopia_ @theo
Optimize you mean tree shake? We did introduce treeshaking of shared code recently. Supports distributed treeshaking at build time or after the fact without needing to redeploy any application. Would you share what implementation you went with instead? Like how do you share code then etc? Or do you not share any dependencies? Or how do you optimize distributed code? Not trying to argue. But if I understand better I can look at how to address this in the future ❤️
1
24
Replying to @LinusEkenstam
Left my phone at a restaurant. Owner showed up at my office before I knew my phone was missing.
1
4
654
Preparing to bring hoodwink back online. After a year hiatus. Sparks have a 20 hour training run to sink repacks codebase into the weights, after that I’ll start training new financial models. Will release hoodwink after I test drive it, without any models initially. But later you’ll likely need a gpu if you want to use it
13
1,361
Zack Jackson retweeted
Source maps now work correctly with React Compiler.
React merged the fix, but it’s been a while since the last React Compiler release 🥲
Thanks to @kdy1dev for setting up a fork that auto-syncs with React and publishes the crates, so we can ship fixes sooner



