Event Loop, Promises, Task Queues and Callstack

Recently reading Event Loop, Promises, Task Queues, Call Stack, and Web APIs in Js. Just jotting down some notes. JavaScript Js is single-threaded, when handling long-running tasks it could block the main thread, causing the UI to freeze. To avoid this, Js uses the following mechanisms to handle async tasks. Call Stack When a function is called, it is pushed onto the call stack. When the function returns, it is popped out of the stack....

June 6, 2024 · 4 min

ASGI? WSGI?

This is what a FastAPI app using Gunicorn managing Uvicorn workers may look like in a nutshell: Web Server vs Application Server vs Web Client Web servers are especially good at serving static content, they are also good at caching, load balancing, and doing reverse proxy. Apache and Nginx are common web servers. Application servers are designed to run application code, they are good at handling dynamic content, and they can run multiple languages....

April 29, 2024 · 2 min

Cherry Pick使用隨筆

前情提要 前幾天在工作的時候開發了一個feature1並且送了 Pull Request, 但是到今天為止都還沒有被 Review, 這時候我需要繼續開發下一個feature2。這個f...

April 11, 2024 · 1 min

UV - A Pip Alternative

Recently I discover a new package manager for Python, uv, which could be a pip alternative written in rust. Just like all the “Rust version” remakes, it has an incredible speed boost compared to pip or poetry. UV can even generate a virtual environment (like the python venv). This is the official benchmark from the uv project description. Just by the glance of this graph I’m alredy amazed by the claim....

April 10, 2024 · 3 min

LINE TECH FRESH 面試分享

LINE TECH FRESH 面試分享

April 5, 2024 · 5 min