Articles

cover of post: A Deep Dive into Gin: Golang's Leading Framework

A Deep Dive into Gin: Golang's Leading Framework

Dec 28, 2024

Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API, but with performance up to 40 times faster than Martini. If you need smashing performance, get yourself some Gin.

DaDaniel Hayes#golang
cover of post: High-Performance Python: Asyncio

High-Performance Python: Asyncio

Dec 27, 2024

Unlike multithreading, `asyncio` is single-threaded, but the mechanism of its internal event loop allows it to run multiple different tasks concurrently and has greater autonomous control than multithreading.Tasks in `asyncio` will not be interrupted during operation, so the situation of race condition will not occur.Especially in scenarios with heavy I/O operations, `asyncio` has higher operating efficiency than multithreading. Because the cost of task switching in `asyncio` is much smaller than that of thread switching, and the number of tasks that `asyncio` can start is much larger than the number of threads in multithreading. However, it should be noted that in many cases, using `asyncio` requires the support of specific third-party libraries, such as `aiohttp` in the previous example. And if the I/O operations are fast and not heavy, using multithreading can also effectively solve the problem.

JaJames Reed#python
cover of post: Mastering Python Async IO with FastAPI

Mastering Python Async IO with FastAPI

Dec 27, 2024

Asynchronous I/O is implemented at the bottom layer using "coroutines" and "event loops". "Coroutines" ensure that when the thread encounters marked I/O operations during execution, it doesn't have to wait for the I/O to complete but can pause and let the thread execute other tasks without blocking. "Event loops" use the I/O multiplexing technology, constantly cycling to monitor I/O events. When a certain I/O event is completed, the corresponding callback is triggered, allowing the coroutine to continue execution.

GrGrace Collins#python
cover of post: The Secret Behind FastAPI’s Speed

The Secret Behind FastAPI’s Speed

Dec 27, 2024

What’s the secret sauce behind FastAPI’s speed? Why does it leave others eating its digital dust?

DaDaniel Hayes#Engineering
cover of post: Is Flask Dead? Is FastAPI the Future?

Is Flask Dead? Is FastAPI the Future?

Dec 25, 2024

The article mainly discusses the current situation and development of Flask and FastAPI in the Python framework field. By comparing the adoption of new projects, the number of GitHub stars, and the proportion in official surveys, it shows that FastAPI's popularity has risen and exceeded that of Flask. Looking back at the development of web frameworks, although Flask once had advantages, it is limited by issues like plugin maintenance. FastAPI stands out with its asynchronous design, Pydantic data validation, and ASGI support. It also explains the decline of Flask's popularity from aspects such as community activity and discussion frequency. Finally, it introduces the advantages of the Leapcell platform suitable for deploying both.

JaJames Reed#python
cover of post: WTH Is Synthetic Testing?

WTH Is Synthetic Testing?

Jan 25, 2025

A brief and friendly introduction to synthetic testing.

JaJames Reed#Testing
cover of post: Will Your Marketing Email End Up in Spam? We Built a Tool to Find Out

Will Your Marketing Email End Up in Spam? We Built a Tool to Find Out

Dec 29, 2024

This article discusses how to use Apache SpamAssassin, an open-source spam detection tool, to evaluate email spam scores and deploy it as an API for seamless integration into workflows.

JaJames Reed#Marketing