An In-Depth Analysis of the BLE Observer Pattern Callback Mechanism

An In-Depth Analysis of the BLE Observer Pattern Callback Mechanism

Osprey Talks Microcontrollers • Source: Osprey Talks Microcontrollers The nRF5 SDK has updated the event callback mechanism starting from version 14, introducing the Observer Pattern to decouple different BLE layers from the callback functions for BLE events. This mechanism utilizes Flash sections, combining function calls in RAM with operations in Flash, which is a novel … Read more

How to Choose an Excellent LoRaWAN Gateway

How to Choose an Excellent LoRaWAN Gateway

In the rapidly developing Internet of Things (IoT) landscape, the LoRaWAN gateway serves as a critical hub connecting numerous low-power wide-area network devices to data centers. Its performance and reliability directly impact the operational efficiency and stability of the entire IoT system. So, how can one select an excellent product among the many LoRaWAN gateways … Read more

A Practical Guide to aiohttp: Building High-Performance HTTP Clients and Servers with Asynchronous Programming

A Practical Guide to aiohttp: Building High-Performance HTTP Clients and Servers with Asynchronous Programming

“Requests allows us to elegantly send requests synchronously, while aiohttp opens the door to the asynchronous world.” 🧠 What is aiohttp? <span>aiohttp</span> is the most popular asynchronous HTTP client and server framework in Python, built on top of <span>asyncio</span>. It performs excellently in scenarios involving high concurrency requests, real-time communication, and microservice interfaces. You can … Read more

Forget SimpleHTTPServer! This Emerging Python Library Makes Uploading and Downloading Easier

Forget SimpleHTTPServer! This Emerging Python Library Makes Uploading and Downloading Easier

Introduction whttpserver is a simple HTTP server, similar to <span>python -m http.server</span>, but adds file upload and editing capabilities, thus solving the confusion of its inability to upload files. It can even start the server using the <span>whttpserver</span> command. Why This Tool is Needed Many company services are now accessed through jump servers, making it … Read more

A Guide to Avoiding Pitfalls with Content-Length in HTTP Requests

A Guide to Avoiding Pitfalls with Content-Length in HTTP Requests

Scenario Recreation: A Frustrating JSON Parsing Issue Recently, during a project integration process, our team encountered a bizarre JSON parsing issue. Here’s what happened: The frontend team copied a normal cURL request from Chrome Developer Tools: curl -X POST https://api.ourcompany.com/v1/orders \ -H "Content-Type: application/json" \ -H "Content-Length: 187" \ -d '{"order_id":"123456","products":[{"sku":"A001","qty":2}],"remark":"Weekend Delivery"}' This request worked … Read more

Choosing Between HTTP and HTTPS for Website Construction: Should You Use www or Not?

Choosing Between HTTP and HTTPS for Website Construction: Should You Use www or Not?

In website construction, the choice of URL needs to be considered from multiple perspectives including security, SEO, and user experience. Here are specific recommendations: 1. HTTP VS HTTPS It is strongly recommended to choose HTTPS for the following reasons: – Security: HTTPS encrypts data transmission through SSL/TLS, preventing information from being stolen or tampered with … Read more

mitmproxy: The Powerful Python Library for HTTP Proxying!

mitmproxy: The Powerful Python Library for HTTP Proxying!

Hello everyone, today I want to introduce a particularly powerful Python library – mitmproxy! It is an intercepting proxy tool that supports HTTP/HTTPS, allowing us to easily monitor and modify network requests. Whether for web scraping or API testing, it can save us a lot of trouble. I have been using it for several years, … Read more

Setting HTTP Request Rate Limiting in Nginx

Setting HTTP Request Rate Limiting in Nginx

ngx_http_limit_req_module The ngx_http_limit_req_module module limits the request processing rate based on the defined key value, particularly for rate limiting requests from a single IP. limit_req_zone Directive Sets up a shared memory zone to store state information and the number of exceeded requests based on the key; the key can include text, variables, or a combination … Read more

Httpx: The Future Star of Asynchronous HTTP!

Httpx: The Future Star of Asynchronous HTTP!

▲ Click the card above to follow me Httpx: Making Asynchronous HTTP Requests Smooth as Silk! The world of network requests in Python has been continuously evolving, and today we are going to talk about this library that excites developers – Httpx. Imagine your network requests no longer crawling like a snail, but flying like … Read more

What are HTTP Long Connections and Pipelining Principles? What is Head-of-Line Blocking? How does HTTP/2 Multiplexing Solve Head-of-Line Blocking? What Optimizations Does HTTP/3’s QUIC Protocol Provide?

What are HTTP Long Connections and Pipelining Principles? What is Head-of-Line Blocking? How does HTTP/2 Multiplexing Solve Head-of-Line Blocking? What Optimizations Does HTTP/3's QUIC Protocol Provide?

This article belongs to the collection: Interviewing the Interviewer Series For more interview questions, feel free to add the assistant’s WeChat at the end of the article! This article overview includes: What are the main differences between HTTP/1.1 and HTTP/1.0? Can you elaborate on how HTTP long connections are implemented, their advantages, and disadvantages? Can … Read more