20241124 ◎

My Thoughts: Python/Django vs Flask/FastAPI/Go

What I love about Django is that it’s ‘batteries included,’ meaning it comes with most of the functionality we need built-in, so we don’t require many additional dependencies.

Different from Django, Flask and FastAPI aim to provide minimal functionalities to build Web API and leave room for developers to choose what additional libraries to install.

However, the process of maintaining dependencies has been challenging to me. A licensing issue may arise, or some packages are not actively maintained, so I’m forced to look for alternatives or sometimes directly work on the project on GitHub.

By using Django, I can reduce the time to maintain the project dependencies, as it provides many resources and release/LTS plans. For most beginners/startups, I would say Django is the best option to avoid unnecessary headaches.

I myself am not familiar with Go yet, but as I talked with my friend and did some programming with it, I realized that software development with Go feels similar to Flask/FastAPI’s principle to let developers add dependencies freely. Go itself has a mechanism to manage dependencies, unlike Python, but there are few dominant players/libraries out there, and getting familiar with the API of dependencies and managing them correctly seemed to be hard.

MEMO: Designing Data-Intensive Applications Chapter 1

In this book, data systems are considered in three aspects.

Reliability

Scalability

Maintainability

In the later chapters, they will be dug deeper with concrete examples.

Things I find interesting

…in some cloud platforms such as Amazon Web Services (AWS) it is fairly common for virtual machine instances to become unavailable without warning, as the platforms are designed to prioritize flexibility and elasticity over single-machine reliability.

I have experienced that AWS instances are not very reliable when running as a single server or a limited number of servers (EC2, Lightsail, and others). This statement concisely expresses their nature and clicked my brain.

The author recommends to use “percentile” to monitor performance (response time).

SLO (service level obectives) SLA (service level agreements)

Some system are elastic, meaning that they can automatically add computing resources when they detect a load increase, whereas other systems are scaled manually.

The use of “elastic” might be new to me.


Lunchable 600 Vegetable sticks 200 Protein bars 600 Tuna Salad 400 Cocoa 200

Total 2000 kcal

push-ups


MUST:

TODO:


index 20241123 20241125