nxweb – Fast and Lightweight Web Server for Applications Written in C & Python

“Sometimes web applications need small and fast components that are best written in C.

Example: ad banner rotation engine. It gets invoked many times on every page of your site producing little HTML snippets based on predefined configuration. How would you implement it?

CGI is not an option as it gets loaded and unloaded on every request. Writing a module for your main web server such as Apache httpd or nginx gives best performance but server’s API isn’t very friendly (especially when dealing with shared memory, etc.). What we need is sort of servlet container for C (just like Java has).

Before writing NXWEB I evaluated a number of existing light/embeddable web servers (mongoose, microhttpd, libevent, G-WAN) each one having their own drawbacks (see notes to benchmarks)…”



Full Stack Web Development with Flask

Flask is a micro web framework powered by Python. Its API is fairly small, making it easy to learn and simple to use. But don’t let this fool you, as it’s powerful enough to support enterprise-level applications handling large amounts of traffic. You can start small with an app contained entirely in one file, then slowly scale up to multiple files and folders in a well-structured manner as your site becomes more and more complex…”


Building Large Flask Apps In The Real World

“Scaling a Flask application is no immediately obvious matter. At plug.dj we had ~22,000 line Flask application. At my previous employer our Flask application was significantly larger. Ultimately scaling a code-base is less about the framework used and more about the software design experience of the developers working on it. Scaling in terms concurrent users also has little to do with the web framework and more to do with your understanding of load-balancing, caching, databases, etc. That being said, what have I learned about how to organize a Flask application to comfortably grow?…”


7 Python Libraries you should know about

“In my years of programming in Python and roaming around GitHub’s Explore section, I’ve come across a few libraries that stood out to me as being particularly enjoyable to use. This blog post is an effort to further disseminate that knowledge.

Please note that I’ve specifically excluded libraries like sqlalchemy and Flask that are too obviously awesome to make the list…”


Advanced Flask Pattern

“This talk shows some interesting patterns for large scale Flask applications and how Flask extension should be structured. It also dives into some of the more unknown helpers in the Werkzeug and Jinja2 base libraries. The goal of this talk is to share some of the things that the documentation can’t explain well by itself. Required prerequisites: basic knowledge of how Flask operates…”