Daily Edition · Page 4

THE DAILY INDEX

Technology, AI, software, security, crypto and business

ARTICLES & TUTORIALS

TLDR Web Dev

HOW WE REDUCED OUR DOCUMENTDB COST BY NEARLY 50% AND OPTIMIZED PERFORMANCE

The activity feed team at Postman investigated their DocumentDB usage and was able to reduce the monthly cost from $6k to $3k with 50% performance gains. They optimized their feed collation query, refined their indexing strategy, shifted from TTL-based deletes to direct deletes, and updated their collation strategy to use updates instead of inserts and deletes. These changes led to significant reductions in both read and write I/O operations and a 35% reduction in CPU utilization.

REACT SERVER COMPONENTS, WITHOUT A FRAMEWORK?

This article explores React Server Components and React Server Actions, clarifying key terms and concepts related to these features and highlighting the experimental and under-documented nature of these APIs. It shows how both can be used to address various challenges in web development, such as data fetching, routing, latency, and more. The article uses an example of migrating a React Notes App to React Server Components without using a framework, showcasing the use of React Canary, React Server & React Flight APIs, and other dependencies.

OH MY POOR BUSINESS LOGIC

In large organizations, there is a tendency to focus on technical minutiae and overcomplicate solutions rather than addressing core business problems. There are two types of companies: the ones that prioritize measurable business outcomes but accumulate technical debt, and those that obsess over technical details and tools without considering the business impact. Finding a middle ground where developers can focus on core business logic without unnecessary complexity is essential.

HOW TO WRITE COMPONENTS THAT WORK IN ANY FRAMEWORK

Web Components that work in any framework consist of three key technologies: Custom Elements, Shadow DOM, and HTML Templates. Custom Elements allow you to define your own custom HTML elements that can be reused across your site and even published for use by other developers. Shadow DOM provides encapsulation, ensuring that the styles and behavior of your custom elements are not affected by global styles. HTML Templates allow you to create reusable templates for rendering content within your web components. While building web components can involve some boilerplate code, there are tools like Lit that simplify the process, making it more streamlined and ergonomic.

TLDR IndexPage 4