{"version":"1.0","type":"rich","provider_name":"Acast","provider_url":"https://acast.com","height":250,"width":700,"html":"<iframe src=\"https://embed.acast.com/$/655148df2861630012a1d01b/6669d884a033650012d3737f?\" frameBorder=\"0\" width=\"700\" height=\"250\"></iframe>","title":"Mark Erikson: How Replay.io is Built, Maintaining Redux","thumbnail_width":200,"thumbnail_height":200,"thumbnail_url":"https://open-images.acast.com/shows/655148df2861630012a1d01b/1718212704744-d77635729a2ca3025add5e6178073ec2.jpeg?height=200","description":"<p>Links</p><p><br></p><p>- Codecrafters (sponsor): https://tej.as/Codecrafters</p><p>- Replay Protocol Examples: https://github.com/replayio/Protocol-Examples</p><p>- Mark on X: https://x.com/acemarke</p><p>- Tejas on X: https://x.com/tejaskumar_</p><p><br></p><p>Summary</p><p><br></p><p>Mark Erikson, the maintainer of Redux and developer at Replay.io, discusses the process of modernizing the Firefox DevTools UI (a React app!) and the challenges of code migration. He shares insights on migrating to TypeScript and the value of staying up to date with the latest techniques. Mark also explains how Replay captures and transmits data for debugging purposes. Replay is a tool that captures and replays browser interactions for debugging purposes. It requires a browser because extensions do not have the same privileged access as a browser.</p><p><br></p><p>During the recording phase, Replay captures network data. The captured data is stored in a binary archive. When a user opens the debugger, the recording is downloaded and cached in the backend. The debugger includes a video playback feature, which is actually a series of JPEG images rendered on a canvas. The element picker in the debugger is a bespoke canvas that interacts with the paused browser process.</p><p><br></p><p>In this conversation, Mark Erikson discusses the capabilities of Replay, a debugging tool for web applications. He explains how Replay allows developers to console log in replays, run code in the browser, and work with source maps and minified code. Mark also discusses the use of Replay in Node.js and the ability to manipulate events in replays. He highlights the backend API of Replay and the potential for future features such as root cause analysis and React time travel.</p><p><br></p><p>Takeaways</p><p><br></p><p>1. Modernizing legacy codebases requires careful planning and a step-by-step approach.</p><p>2. Migrating to TypeScript can improve code maintainability and reduce bugs.</p><p>3. Replay.io captures and transmits browser events and interactions for debugging purposes.</p><p>4. Extensions do not have the same privileged access as a browser, which is why Replay requires a browser.</p><p>5. Replay can be used in Node.js environments, and developers can manipulate events in replays to simulate different outcomes.</p><p>6. Future features of Replay include root cause analysis and React time travel, which will further enhance the debugging experience for developers.</p><p><br></p><p>Chapters</p><p><br></p><p>00:00:00 Mark Erikson</p><p>00:02:40 Introduction and Background</p><p>00:03:59 Replay.io and Time Travel Debugger</p><p>00:08:48 Modernizing the Codebase</p><p>00:11:44 The Challenges of Code Migration</p><p>00:13:39 Finding Joy in Legacy Code</p><p>00:16:11 Migrating to TypeScript</p><p>00:19:16 The Process of Modernization</p><p>00:30:19 The Pressure and Value of Modernization</p><p>00:35:47 The Trade-offs of Using the Latest Techniques</p><p>00:37:12 Capturing and Transmitting Data in Replay</p><p>00:38:11 Replay: Capturing and Replaying Browser Interactions</p><p>00:45:56 Why Replay Requires a Browser</p><p>00:46:51 Capturing Network Data and Security Concerns</p><p>00:48:54 Recording and Storing the Binary Archive</p><p>00:56:21 Downloading and Caching the Recording</p><p>00:58:46 Pre-Processing and Caching Basic Data</p><p>01:03:30 The Video Playback and Memory Snapshots</p><p>01:10:39 Inspecting Elements and the Bespoke Canvas</p><p>01:14:26 Building the Replay Debugger</p><p>01:16:49 Replay's Capabilities</p><p>01:18:12 Console Logging in Replays</p><p>01:19:50 Running Code in the Browser</p><p>01:20:51 Source Maps and Minified Code</p><p>01:22:44 Shipping Source Maps</p><p>01:25:41 Replay in Node.js</p><p>01:26:12 Using Replay in the Terminal</p><p>01:33:50 Manipulating Events in Replay</p><p>01:38:02 Replay's Backend API</p><p>01:51:33 Future Features: Root Cause Analysis and React Time Travel</p><p>01:54:41 Closing Remarks</p>","author_name":"Tejas Kumar"}