主页 | Web版 | 订阅 | 归档 | Feed

GopherDaily

20251118

每日一谚:Use `any` for generics and `interface{}` for interfaces


Go技术生态

Go 在 Web3 的统治力:2025 年架构与生态综述
截至 2025 年末,Go 语言 (Golang) 作为基础设施主导语言,在 Web3 生态系统中的地位已然根深蒂固。Go 的架构特性——特别是其内置的并发模型、简单的语法以及继承自云基础设施领域的强大工具链——使其对于运行在链下或核心网络层的、任务关键型、高吞吐量的系统而言,是不可或缺的。 本文旨在系统性地剖析 Go 语言在 Web3 领域的“统治力”从何而来,将向何处去。我们的核心发现证实了 Go 在几个关键领域不可动摇的地位

理解 Go 编译器:类型检查器
在之前的文章中,我们探讨了将源代码转换为标记的扫描器,以及获取这些标记并构建抽象语法树的解析器。在未来的文章中,我将介绍中间表示 (IR)——编译器如何将 AST 转换为中间的较低级别形式。但在我们到达那里之前,我们需要讨论两个关键的中间步骤:类型检查(本篇文章)和统一 IR(我将在单独的文章中很快介绍)。

【Go模块构建与依赖管理】12 实战解剖:Kubernetes 是如何管理数百个依赖的?

使用 Re-exec 测试 Go 子进程
在测试生成子进程的 Go 代码时,通常有三种选择。运行实际命令。它调用创建子进程的实际二进制文件并根据输出来断言。但是,这会使测试变慢并与环境相关联。你必须确保相同的二进制文件存在并且在任何地方都表现相同,这比听起来更难。伪造它。模拟子进程以保持测试快速和隔离。问题是,伪造版本不像一个真正的进程。它不会失败,不会写入 stderr,也不会以非零代码退出。这使得很难相信结果,而且随着时间的推移,模拟可能会偏离实际命令的实际作用。

阻塞队列是什么以及我们为什么需要它们
并发编程是软件工程中最有趣和最具挑战性的方面之一。当多个 goroutine 需要共享数据时,协调访问变得至关重要。阻塞队列是解决此问题的一种优雅方案,它改变了我们对线程协调的思考方式。在本文中,我们将探讨什么是阻塞队列、它们的工作原理以及它们对于构建健壮的并发系统至关重要。

全栈开发者 2.0
软件曾经感觉是互联的。后来它分裂了。后端、前端、DevOps、QA。每一个都用自己的语言说话,每一个都在等待其他人行动。......

云原生技术

Tailscale GitHub Action v4: faster, more reliable, and new features
This rewrite opens doors to new functionality and provides a drastically improved and smoother CI/CD experience.

将 Netflix 的基础模型集成到个性化应用中
构建用于个性化的 Netflix 基础模型的动机在于之前的博文。 Netflix 首页由几个专业模型提供支持,维护和持续创新这些独立模型需要大量的时间和资源。 因此,我们决定集中成员的偏好学习,并建立一个强大的模型,该模型从大规模的综合用户交互历史和内容数据中学习,并让该模型将其学习成果分发给其他模型。

Third Stage Engineering
作者分享了一个关于计算机硬件性能的观点,认为生产中任何计算机硬件的真正性能都是硬件、软件和调优的结果。他将此比作一个三级火箭,并强调了软件和调优的重要性,以实现最大和最具竞争力的性能。作者认为,许多评估只考虑硬件,而忽视了其他两个阶段。

Has Grafana Taken Lead in AI for Observability? - The New Stack
That depends on how you measure all vendors' approaches to AI. But Grafana's new AI-based capabilities do signify practical improvements.

Continuous Architecture: A decade of designing for change
Since Continuous Architecture was first introduced some ten years ago, it has been encouraging to see so many people starting to recognise that the point is the architecture work, not the architects. Many architects have also transitioned to be technical leaders and guides rather than trying to make and govern every technical decision themselves. And just as architecture is best performed as a continual process, the way we do architecture has also evolved. Ten years on, it’s a good time to remind ourselves where Continuous Architecture began, the principles it set out, and how well they’ve stood the test of time.

Ingress-nginx 归档:现在是迁移到 Cilium 的时候了
Ingress-nginx 正在被存档,Kubernetes 团队需要一条安全、受支持的道路。这篇文章解释了退休的含义,比较了您的选项,并展示了如何快速迁移到 Cilium Ingress 或采用 Cilium Gateway API 进行高级流量管理。

读了 20 多本软件架构书籍后,这些是每个高级开发人员都应该阅读的 7 本
7 本高级软件工程师可以阅读的最佳书籍,以更好地学习软件架构和系统设计

我希望有人向我解释的 Clean 架构
在过去的几年里,Clean 架构从几乎是强制性的东西变成了故事中的反派。在很多时候,任何想写“严肃代码”的人都觉得有压力要遵循它。如今,许多人将其视为过度设计的同义词。我经历了这两种情况,在所有的观点和相互矛盾的实现之间,我开始想,我们是否忽视了重点。

将 Ruby 编译成机器语言
我开始着手编写《Ruby Under a Microscope》的新版本,该版本涵盖 Ruby 3.x。我正在利用空闲时间做这件事,所以需要一段时间。请留下评论或给我发邮件,我会在完成时通过电子邮件通知您。 这是关于 YJIT 和 ZJIT 的全新第 4 章内容节选。我仍在完成这项工作……所以这些内容是新鲜出炉的!学习 JIT 编译器的工作原理并提高我的 Rust 技能,这对我来说很有趣。看到 Shopify 的 Ruby 团队和其他贡献者为提高 Ruby 的运行时性能所做的令人印象深刻的工作,这令人非常兴奋。

Kubernetes In-Tree Scheduler Plugins: A Complete Reference
本文是探讨 Kubernetes kube-scheduler 系列博文的一部分。本文为所有 in-tree 插件提供了完整的参考,解释了每个插件的功能、它实现了哪些扩展点、内部工作原理、可以自定义的配置选项(每个插件都包含)以及实际用例。

构建一个真正可用的简单搜索引擎
大多数项目不需要 Elasticsearch。我从头开始构建了一个简单的搜索引擎,它会标记所有内容,将其存储在您现有的数据库中,并按相关性对结果进行评分。非常简单易懂,易于维护。

AI

“小型”开源的命运
Nolan Lawson 询问 LLM 的协助是否意味着像他自己的 blob-util 这样的微型开源库类别注定要消失。为什么要在你的代码中添加额外的供应链风险,增加另一个依赖项,而 LLM 可能会淘汰你自己的代码所需的子集功能?

Kosmos: An AI Scientist for Autonomous Discovery
今天,我们宣布推出 Kosmos,这是我们下一代 AI 科学家。Kosmos 是我们之前的 AI 科学家 Robin 的重大升级。您可以在我们的技术报告中阅读它,这里。Kosmos 从第一天起就可以在我们的平台上使用,这里。

AGI 幻想阻碍了实际工程
AGI 是一种有害且浪费的幻想,与高效和有效的工程原则背道而驰。

流行工具与项目

google/adk-go
An open-source, code-first Go toolkit for building, evaluating, and deploying sophisticated AI agents with flexibility and control.

traefik/traefik
The Cloud Native Application Proxy

milvus-io/milvus
Milvus is a high-performance, cloud-native vector database built for scalable vector ANN search

fatedier/frp
A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.

beclab/Olares
Olares: An Open-Source Personal Cloud to Reclaim Your Data

jesseduffield/lazydocker
The lazier way to manage everything docker

go-playground/validator
💯Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving

containers/podman
Podman: A tool for managing OCI containers and pods.

open-telemetry/opentelemetry-collector
OpenTelemetry Collector

go-chi/chi
lightweight, idiomatic and composable router for building Go HTTP services

gin-gonic/gin
Gin is a high-performance HTTP web framework written in Go. It provides a Martini-like API but with significantly better performance—up to 40 times faster—thanks to httprouter. Gin is designed for building REST APIs, web applications, and microservices.

oauth2-proxy/oauth2-proxy
A reverse proxy that provides authentication with Google, Azure, OpenID Connect and many more identity providers.

putyy/res-downloader
视频号、小程序、抖音、快手、小红书、直播流、m3u8、酷狗、QQ音乐等常见网络资源下载!

cloudreve/cloudreve
🌩 Self-hosted file management and sharing system, supports multiple storage providers

hashicorp/consul
Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.

crossplane/crossplane
The Cloud Native Control Plane

moby/moby
The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems

jmoiron/sqlx
general purpose extensions to golang's database/sql

influxdata/telegraf
Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.

Masterminds/squirrel
Fluent SQL generation for golang

temporalio/temporal
Temporal service

opencloud-eu/opencloud
🌤️This is the main repository of the OpenCloud server. It contains the golang codebase for the backend services.

jackc/pgx
PostgreSQL driver and toolkit for Go


编辑:Tony Bai

编辑主页:tonybai.com

GopherDaily项目:github.com/bigwhite/gopherdaily

Copyright 2019-2024 GopherDaily