Omar’s blog

A cozy corner in the expansive web.

Rolling a minimal Gunicorn: WSGI and connection management

The simple HTTP server we built previously was a great starting point, but it’s limited when it comes to handling concurrent connections. Enter Gunicorn—a renowned WSGI HTTP server designed for serving Python applications. In this article, I’ll craft a stripped-down version of Gunicorn, delving into the intricacies of the Web Server Gateway Interface (WSGI) and the art of asynchronous connection management, both essential for modern web applications. WSGI: The Building Block A brief overview WSGI is a specification, a set of rules and standards that defines how web servers interact with web applications or frameworks in the Python realm....

January 5, 2023 · 11 min · Omar

Understanding the Python socket library

I recall my childhood days, when out of sheer curiosity, I’d dismantle my toys, seeking their hidden mechanics. That same thirst for knowledge persists. In our previous rendezvous, we pieced together a basic HTTP server, akin to assembling a digital toy train. It might have seemed straightforward, but the underlying intricacies were captivating. So in this article, I aim to demystify the socket library’s inner workings. I will delve into how it turns our Pythonic method calls into tangible system-level actions....

December 2, 2022 · 9 min · Omar

The road begins: HTTP, Sockets and Hello World

It’s a cool autumn evening. I’m sitting at my desk, a steaming cup of tea by my side, and a soft jazz playlist filling the air with its soothing notes. I’ve just closed the tab on a captivating article about some obscure facet of technology, and I find myself contemplating the unsung heroes of the digital world: HTTP servers. They’re like the stagehands in a grand theater production, quietly making sure everything runs without a hitch, yet rarely receiving the applause....

November 25, 2022 · 10 min · Omar