Searching txt.sour.is

Twts matching #reading
Sort by: Newest, Oldest, Most Relevant

API 設計的 “Go 境界”:Go 團隊設計 MCP SDK 過程中的取捨與思考
大家好,我是 Tony Bai。作爲開發者,我們每天都在與 API 打交道——調用它們,設計它們,有時也會爲糟糕的 API 設計而頭痛不已。一個優秀的 API,如同一位技藝精湛的嚮導,能清晰、高效地引領我們通往復雜功能的彼岸;而一個蹩腳的 API,則可能像一座佈滿陷阱的迷宮,讓我們步履維艱。那麼,在 Go 語言的世界裏,一個 “好” 的 API 應該是什麼樣子的?它應該如何體現 Go 語言簡潔、高 ⌘ Read more

⤋ Read More

API 設計的 “Go 境界”:Go 團隊設計 MCP SDK 過程中的取捨與思考
大家好,我是 Tony Bai。作爲開發者,我們每天都在與 API 打交道——調用它們,設計它們,有時也會爲糟糕的 API 設計而頭痛不已。一個優秀的 API,如同一位技藝精湛的嚮導,能清晰、高效地引領我們通往復雜功能的彼岸;而一個蹩腳的 API,則可能像一座佈滿陷阱的迷宮,讓我們步履維艱。那麼,在 Go 語言的世界裏,一個 “好” 的 API 應該是什麼樣子的?它應該如何體現 Go 語言簡潔、高 ⌘ Read more

⤋ Read More

tokio-mpmc:高性能異步多生產者多消費者隊列
tokio-mpmc 是一個基於 Tokio 異步運行時的高性能多生產者多消費者隊列實現,專爲異步 Rust 應用提供高效的數據傳遞機制。本文將深入淺出地介紹其架構設計、工作原理和使用方法。設計背景在異步編程中,特別是構建高性能併發系統時,任務間的數據傳遞是核心問題。雖然 Rust 生態中已有多種隊列實現(如 std::sync::mpsc、tokio::sync::mpsc、tokio::syn ⌘ Read more

⤋ Read More

自制 ResponseWriter:Go 安全 HTTP
Go 的 http.ResponseWriter 會直接向套接字(socket)寫入數據,這可能會導致一些隱蔽的 bug,例如忘記設置狀態碼,或是在爲時已晚的時候意外修改了響應頭(header)。本文將展示如何通過包裝 ResponseWriter 來強制執行自定義規則,例如要求 WriteHeader() 以及在出錯後阻止寫入操作,從而讓你的處理器(handler)更安全、也更易於梳理邏輯。我用 ⌘ Read more

⤋ Read More

自制 ResponseWriter:Go 安全 HTTP
Go 的 http.ResponseWriter 會直接向套接字(socket)寫入數據,這可能會導致一些隱蔽的 bug,例如忘記設置狀態碼,或是在爲時已晚的時候意外修改了響應頭(header)。本文將展示如何通過包裝 ResponseWriter 來強制執行自定義規則,例如要求 WriteHeader() 以及在出錯後阻止寫入操作,從而讓你的處理器(handler)更安全、也更易於梳理邏輯。我用 ⌘ Read more

⤋ Read More

Go 語言實現優雅關機和重啓的示例很詳細
在生產環境中,服務的更新和維護是不可避免的。粗暴地終止服務會導致:正在處理的請求被中斷 數據庫事務未完成 緩存數據丟失 客戶端連接異常 本文將深入探討如何使用 Go 語言實現:優雅關機 :等待現有請求完成後再關閉服務 優雅重啓 :無縫切換新舊進程,實現零停機更新 優雅關機實現核心機制完整實現代碼package mainimport(” ⌘ Read more

⤋ Read More

Go 語言實現優雅關機和重啓的示例很詳細
在生產環境中,服務的更新和維護是不可避免的。粗暴地終止服務會導致:正在處理的請求被中斷 數據庫事務未完成 緩存數據丟失 客戶端連接異常 本文將深入探討如何使用 Go 語言實現:優雅關機 :等待現有請求完成後再關閉服務 優雅重啓 :無縫切換新舊進程,實現零停機更新 優雅關機實現核心機制完整實現代碼package mainimport(” ⌘ Read more

⤋ Read More

業務冪等性技術架構體系
現如今很多系統都會基於分佈式或微服務思想完成對系統的架構設計。那麼在這一個系統中,就會存在若干個微服務,而且服務間也會產生相互通信調用。那麼既然產生了服務調用,就必然會存在服務調用延遲或失敗的問題。當出現這種問題,服務端會進行重試等操作或客戶端有可能會進行多次點擊提交。如果這樣請求多次的話,那最終處理的數據結果就一定要保證統一,如支付場景。此時就需要通過保證業務冪等性方案來完成   冪等性不 ⌘ Read more

⤋ Read More

Gin 服務性能提升的最佳實踐
Gin 框架是在 Go 中構建網絡服務的首選。隨着應用程序複雜性和流量的增加,性能成爲不能忽視的因素。本文將介紹一系列使用 Gin 構建服務的有效技巧,涵蓋從路由優化到內存重用、請求和響應優化、異步處理以及性能分析,幫助你創建更穩定高效的 Web 服務。路由註冊優化:避免循環引用————-Gin 的路由器使用基於樹的高效路由實現,可以快速匹配請求路徑。但是,如果路由註冊不當,例如嵌 ⌘ Read more

⤋ Read More

Gin 服務性能提升的最佳實踐
Gin 框架是在 Go 中構建網絡服務的首選。隨着應用程序複雜性和流量的增加,性能成爲不能忽視的因素。本文將介紹一系列使用 Gin 構建服務的有效技巧,涵蓋從路由優化到內存重用、請求和響應優化、異步處理以及性能分析,幫助你創建更穩定高效的 Web 服務。路由註冊優化:避免循環引用————-Gin 的路由器使用基於樹的高效路由實現,可以快速匹配請求路徑。但是,如果路由註冊不當,例如嵌 ⌘ Read more

⤋ Read More

Banana Pi BPI-Forge1 Is a Low-Cost RK3506J-Based SBC Compatible with RT-Thread
Banana Pi’s BPI-Forge1 is a compact single-board computer based on the Rockchip RK3506J SoC, designed for digital multimedia processing, intelligent voice interaction, and real-time audio applications. The board supports a range of embedded use cases through its integrated audio and display subsystems, peripheral connectivity, and small form factor. The RK3506J features a triple-core Arm … ⌘ Read more

⤋ Read More

AAEON EPIC-RPS7 Targets Compact Industrial Control with 14th Gen Intel Core Support
AAEON has introduced the EPIC-RPS7, a 4″ industrial SBC aimed at cost-sensitive applications like industrial control, PLC automation, and remote monitoring. It supports 12th to 14th Gen Intel Core processors (up to 65W TDP), bringing high performance to space-limited deployments. The EPIC-RPS7 supports up to 64GB of DDR5 memory across two SODIMM slots and is […] ⌘ Read more

⤋ Read More

Streamlining application deployment on Kubernetes at RBC Capital Markets: A journey with FluxCD
As we learned from the first blog in our series, RBC has taken a holistic approach on our cloud journey, as it enables technologies across our enterprise. In today’s post, we’re going to share how Capital Markets… ⌘ Read more

⤋ Read More

Mozilla is shutting down Pocket
Mozilla has announced
that it is shutting down Pocket, a bookmarking service acquired by Mozilla
in 2017, this coming July. “Pocket has helped millions save articles
and discover stories worth reading. But the way people use the web has
evolved, so we’re channeling our resources into projects that better match
their browsing habits and online needs.” ⌘ Read more

⤋ Read More

Fedora Council overturns FESCo provenpackager decision
The Fedora Council has ruled on the Fedora Engineering Steering
Council’s (FESCo) decision last year to revoke Peter Robinson’s
provenpackager status. In a statement
published to the fedora-devel-announce mailing list, the council has
announced that it has overturned FESCo’s decision:

FESCo didn’t have a specific policy for dealing with a request to remove
Proven Packager rights. In addition, the FESCo process wa … ⌘ Read more

⤋ Read More

Security updates for Thursday
Security updates have been issued by AlmaLinux (kernel, kernel-rt, and webkit2gtk3), Fedora (mozilla-ublock-origin and sudo-rs), Oracle (.NET 8.0, compat-openssl10, grafana, osbuild-composer, redis:6, ruby:2.5, and webkit2gtk3), SUSE (dante, firefox-esr, gnuplot, govulncheck-vulndb, grype, postgresql13, postgresql14, postgresql15, postgresql16, postgresql17, python-tornado6, python314, thunderbird, ucode-intel, and xen), and Ubuntu (bind9, libfcgi-perl, linux-ibm-5.4, linux-oracle-5.4 … ⌘ Read more

⤋ Read More

Machinist and Machine
Reading and “accepting/rejecting” so much AI generated code in the last months has made me a bit burned out and have somewhat of an identity crisis.

I have been making more and more time at night to reconnect with the craft.

I think more people in the community might be struggling, so I just wanted to share my way of dealing with it.

Please share how you are dealing with the tokens.

CommentsRead more

⤋ Read More

Review: Satechi’s Foldable 3-in-1 Charger Maximizes Portability
Satechi, known for its range of accessories for Apple products, recently came out with a new series of OntheGo Wireless Chargers that are perfect for bringing along on trips due to their compact size.

Image

There are two models, a 3-in-1 charger and a 2-in-1 charger. The 3-in-1 option has a Qi2 charging surface for an iPhone, an AirPod … ⌘ Read more

⤋ Read More

‘They’re Not Just Cutting Medicaid’: GOP Bill Would Trigger Over $500 Billion in Medicare Cuts
Jake Johnson,  Senior Editor  -  Common Dreams

_Stephan: By the time you read this, if the Congressional MAGAt Trump servitors pull off their dead of night scheme and pass Trump’s bill if you depend on Medicaid for healthcare, you may have lost it. If you, like my wife and I, are old enough to be on Medicare, it may have been devastated. If y … ⌘ Read more

⤋ Read More

Trump demands Obama arrest in frantic QAnon-fueled posting spree
Matthew Chapman,  News Writer  -  Raw Story

_Stephan: The increasing fascism that is pervading Trump’s administration flows from the top down, and it is actually getting rather scary. “Disappearing” people to places like South Sudan, where they will probably never be seen again. Congressional testimony by high-ranking officials who clearly are incompetent and unqualified to hold the posts to whic … ⌘ Read more

⤋ Read More

FEMA Shifts Disaster Burden to States in Wake of Deadly Tornadoes
Ellyn Lapointe,  Contributing Writer  -  Gizmodo

_Stephan: I feel very sorry for the individuals and families, particularly in Red states, who are already suffering from climate events like tornadoes, but I am particularly concerned about those living in hurricane regions. The dismantlement of FEMA by the Trump coup is going to leave hundreds of thousands, maybe millions of Americans, without t … ⌘ Read more

⤋ Read More

Mortgage rates jump above 7% after Moody’s downgrade of U.S. credit
Aarthi Swaminathan,  Staff Writer  -  Markey Watch

_Stephan: As the Trump fascist coup dismantles the American economy, buying a house becomes ever more difficult. As this report describes, because of what the Trump coup has done, Moody’s dropped the United States’ credit rating and this, in turn, has caused mortgage rates to go above 7%. The average house price in the U.S. is currently $503,8 … ⌘ Read more

⤋ Read More

10 Terrifying Facts You Never Wanted to Know
Many people love general knowledge quizzes or even quiz nights. They get to share interesting facts and show off in front of their friends, while having a great time. (Not in a Sheldon Cooper kind of way, mind you). Then you get those who love weird or downright terrifying facts. They revel in reading about […]

The post [10 Terrifying Facts You Never Wanted to Know](https://listverse.com/2025/05/22/10-terrifying-facts-you-never-wanted-to-know … ⌘ Read more

⤋ Read More

10 Fascinatingly Gross Secrets About Your Body
The human body is an amazing biological machine that’s capable of the most remarkable abilities, including abstract thought and creating profound art. It’s also capable of some pretty gross things, like excreting cholesterol through the skin or producing a literal pitcher of flatulence on a daily basis. The following facts highlight some of our amazing […]

The post [10 Fascinatingly Gross Secrets About Your Body](https://listverse.com/202 … ⌘ Read more

⤋ Read More

100 萬的併發,如何設計一個商品搜索系統?
前言–大家好,我是田螺。今天我們來看一道比較有深度的面試題:百萬併發下,商品搜索系統,你如何設計呢? 假設場景:某電商平臺大促期間,需支撐每秒 100 萬次的商品搜索請求,要求響應時間≤200ms,同時應對商品數據量超 10 億條。假設給你來做系統設計,怎麼做呢?如果是我來回答面試官這道題的話,我會按照這些思路來跟面試官闡述:爲什麼不能用 MySQL 的 llike? 總體架構設計 ⌘ Read more

⤋ Read More

自己寫一個分佈式定時任務框架 - 負載均衡 - OpenAPI 異步調用!
項目背景目前的定時任務框架已經很成熟,從 QuartZ 到 xxl-job,再到近幾年出現的 PowerJob,既然有這麼多的好的實現,爲什麼還是選擇重寫一個定時任務框架呢?開發中遇到這樣的場景,業務層面需要頻繁的創建修改定時任務,在考慮分佈式的架構下,對於目前可以實現該功能的框架中:MQ 的延時隊列無法動態調整任務參數; redis 的過期策略需要保存太久的 key 且可能會有 BigKe ⌘ Read more

⤋ Read More

Google 的 AI 防護方案 - AI Protection
在 Google Next 2025 上,Google 推出一款全新解決方案 -AI Protection,保護整個 AI 生命週期內降低風險。 這是一個結合 AI 與數據安全的方案,非常有前瞻性,值得看看。方案概要AI Protection 通過以下方式幫助團隊全面管理 AI 風險:主要有三個功能:①發現您環境中的 AI 資產並評估其潛在漏洞②通過控制、政策和護欄保護人工智能資產,這是重點③通過 ⌘ Read more

⤋ Read More

Jony Ive’s AI Product ‘Third Core Device’ After MacBook and iPhone
Details have leaked about the device that OpenAI is developing with former Apple designer Jony Ive. OpenAI is acquiring io, the hardware-based AI startup co-created by Jony Ive, and the first product is one of a family of devices the company intends to launch.

Image

Ive and Ope … ⌘ Read more

⤋ Read More

代碼覆蓋率新玩法:Russ Cox 教你用差異化分析加速 Go 調試
大家好,我是 Tony Bai。調試,尤其是調試並非自己編寫的代碼,往往是軟件開發中最耗時的環節之一。面對一個失敗的測試用例和龐大的代碼庫,如何快速有效地縮小問題範圍?Go 團隊的前技術負責人 Russ Cox 近期分享了一個雖然古老但極其有效的調試技術——差異化覆蓋率 (Differential Coverage)。該技術通過比較成功和失敗測試用例的代碼覆蓋率,巧妙地 “高亮” 出最可能包含 B ⌘ Read more

⤋ Read More

代碼覆蓋率新玩法:Russ Cox 教你用差異化分析加速 Go 調試
大家好,我是 Tony Bai。調試,尤其是調試並非自己編寫的代碼,往往是軟件開發中最耗時的環節之一。面對一個失敗的測試用例和龐大的代碼庫,如何快速有效地縮小問題範圍?Go 團隊的前技術負責人 Russ Cox 近期分享了一個雖然古老但極其有效的調試技術——差異化覆蓋率 (Differential Coverage)。該技術通過比較成功和失敗測試用例的代碼覆蓋率,巧妙地 “高亮” 出最可能包含 B ⌘ Read more

⤋ Read More

乾貨!支付業務如何防止資損?
防止資損是支付系統最重要的目標之一,不論是進行支付中臺建設,還是作爲業務系統接入支付能力,涉及到資金流轉的場景需謹慎!謹慎!再謹慎!定義資損狹義的 “資損” 是直接資金損失,涉及到資金流轉過程發生的賬戶金額損失,比如用戶多扣了錢、商戶少收了錢等等。廣義的資損是指間接的資金損失,在由於某些原因導致潛在收款失敗,比如系統宕機導致大量用戶無法進行支付付款。資損的本質是由於產品、技術或安全等原因導致的相關 ⌘ Read more

⤋ Read More

[$] LWN.net Weekly Edition for May 22, 2025
Inside this week’s LWN.net Weekly Edition:

  • Front: Home Assistant; Setuptools; Debian AI GR; DMA-mapping API; BPF CI; OSPM 2025

  • Briefs: Go audit; Oniux; Asahi progress; Rust in FreeBSD; RHEL 10; Rust 1.87.0; RIP John L. Young; Quote; …

  • Announcements: Newsletters, conferences, security updates, patches, and more. ⌘ Read more

⤋ Read More

Radxa ROCK 4D with RK3576 SoC, PCIe Gen2 x1, Gigabit Ethernet, and PoE Support
Radxa has introduced a single-board computer with a form factor similar to the Raspberry Pi 3, powered by the octa-core Rockchip RK3576 system-on-chip. Key features of the new ROCK 4D include PCIe Gen2 expansion, Gigabit Ethernet with PoE support, and broad I/O compatibility. The board is built around the Rockchip RK3576 SoC, which integrates four […] ⌘ Read more

⤋ Read More

How to Flush DNS Cache on macOS Sequoia & Sonoma
If you’re running macOS Sequoia or macOS Sonoma, you might occasionally find yourself in a situation where you need to flush the DNS cache on your Mac. This can be necessary to fix DNS related issues or errors, to clear out outdated DNS settings or records, to resolve issues with certain websites, or even to … Read MoreRead more

⤋ Read More