Explore the art of backend engineering as you dive into communication design patterns that frequently emerge in the field. With my 18 years of experience in building backend applications, I've identified key patterns such as request-response, publish-subscribe, short and long polling, and push methods. These are among the most prevalent ways clients interact with backend systems.
Understanding Backend Communication Protocols
Building upon these communication design patterns, engineers utilize various protocols to facilitate concrete communication. Although the foundational transport mechanisms are limited to TCP or UDP, numerous industry-specific protocols have been developed to address specific needs. Notable examples include HTTP/1.1, HTTP/2, HTTP/3, gRPC, and WebRTC. Additionally, protocols like QUIC, built on UDP, help integrate HTTP/2 streaming at the transport level. Each protocol offers unique advantages and is best suited for certain scenarios. Throughout this course, I will delve into the most commonly used protocols, providing examples and demonstrations where applicable.
Connection Establishment and Management
Before a client can send a request, it must first establish a connection with the backend. Understanding the nuances of connection establishment, including what occurs at the kernel level versus the backend application process, is critical. You'll learn how connections are accepted efficiently by the backend application to prevent the kernel queue from becoming full, which would block clients from connecting.
Request Handling in Backend Applications
Once a connection is established, the client sends a request. But what exactly transpires within the backend application to process this request? Discover what constitutes a request and understand the implications of parsing it, based on the chosen protocol. This knowledge equips engineers with the tools to troubleshoot performance issues and identify bugs efficiently.
Backend Execution Patterns
After receiving a request, the backend must execute it. A variety of design choices are available for execution styles. Understanding the differences between processes and threads, multi-process, multi-threaded models, and their relationship to CPU cores and hardware threads is pivotal in selecting the appropriate pattern. While traditional patterns are effective, engineers can always innovate new patterns tailored to specific requirements.
Course Prerequisites and Audience
This course is tailored for engineers with prior experience in building backend applications. It is categorized as an intermediate to advanced-level course. Familiarity with programming and networking is a prerequisite. If you lack networking skills, I suggest completing my foundational network engineering course first. I hope you find this course both informative and enjoyable, and I sincerely thank you for considering it.