GO语言
-
Go Engineer Comprehensive Course 011 [Study Notes]
Inverted Index for Queries
1. What is an Inverted Index?
An Inverted Index is a data structure used to quickly find documents containing specific terms. It is one of the core technologies of search engines.
1.1 Basic Concepts
Forward Index: Document ID → Document Content (list of terms)
Inverted Index: Term → List of Document IDs containing the term
1.2 Why is it called "Inverted"?
An inverted index reverses the traditional relationship of "which terms a document contains" to "in which documents a term appears... -
Go Engineer System Course 012 [Study Notes]
Integrate Elasticsearch in Go 1. Client Library Selection 1.1 Mainstream Go ES Clients olivere/elastic: Most comprehensive features, elegant API design, supports ES 7.x/8.x elastic/go-elasticsearch: Official client, lightweight, closer to native REST API go-elasticsearch/elasticsearch: Community-maintained offi…
-
Go Engineer System Course 013 [Study Notes]
Order transactions, whether deducting inventory first or later, will both affect inventory and orders. Therefore, distributed transactions must be used to address business issues (e.g., unpaid orders). One approach is to deduct inventory only after successful payment (e.g., an order was placed, but there was no inventory at the time of payment). Another common method is to deduct inventory when the order is placed, but if payment isn't made, the order is returned/released upon timeout.
Transactions and Distributed Transactions
1. What is a transaction?
A transaction is an important concept in database management systems. It is a collection of database operations, which either all execute successfully, or all... -
Go Engineering Systematic Course 014 [Study Notes]
RocketMQ Quick Start. Go to our various configurations (podman) to see how it's installed. Introduction to Concepts: RocketMQ is a distributed messaging middleware open-sourced by Alibaba and an Apache top-level project. Core components: NameServer: Service discovery and routing; Broker: Message storage, delivery, and fetching; Producer: Message producer (sends messages); Consumer: Message consumer (subscribes to and consumes messages); Topic/Tag: Topic/...
-
Go Engineer's Comprehensive Course 017: Learning Notes
Introduction to Rate Limiting, Circuit Breaking, and Degradation (with Sentinel Practical Application)
Based on the key video points from Chapter 3 (3-1 to 3-9) of the courseware, this guide compiles a service protection introduction for beginners, helping them understand "why rate limiting, circuit breaking, and degradation are needed," and how to quickly get started with Sentinel.
Learning Path at a Glance
3-1 Understanding Service Avalanche and the Background of Rate Limiting, Circuit Breaking, and Degradation
3-2 Comparing Sentinel and Hystrix to clarify technology selection
3-3 Sen... -
Go Engineer System Course 018 [Study Notes]
Getting Started with API Gateway and Continuous Deployment (Kong & Jenkins) corresponds to the course materials "Chapter 2: Getting Started with Jenkins" and "Chapter 3: Deploying Services with Jenkins", outlining the practical path for Kong and Jenkins in enterprise-level continuous delivery. Even with zero prior experience, you can follow the steps to build your own gateway + continuous deployment pipeline. Pre-class Introduction: What is an API Gateway? An API Gateway sits between clients and backend microservices...
-
Go Engineer Comprehensive Course: protoc-gen-validate Study Notes
protoc-gen-validate: Introduction and Usage Guide ✅ What is protoc-gen-validate? protoc-gen-validate (PGV for short) is a Protocol Buffers plugin used to add validation logic for struct fields in generated Go code. It automatically generates validation code for each field by adding validation rules in .proto files, saving you the trouble of manually...
-
Go Engineer Comprehensive Course: Protobuf Guide [Study Notes]
Protocol Buffers Getting Started Guide 1. Introduction Protocol Buffers (protobuf for short) is a language-agnostic, platform-agnostic, extensible structured data serialization mechanism developed by Google. Compared with serialization methods such as JSON and XML, protobuf is smaller, faster, and simpler. Project homepage: https://github.com/protocolbuffers/prot…