Yumengjh's Wiki
website·Indexed 31 days ago
https://blog.yumgjs.comA comprehensive knowledge base focusing on Docker, covering installation, image management, container operations, Dockerfile construction, and networking. It includes detailed guides on Docker Compose, Docker Swarm, Docker Buildx, and registry workflows for GHCR (GitHub Container Registry) and ACR.
What's inside Yumengjh's Wiki
- Nginx load balancing strategies are divided into two categories: Built-in and Extended. Built-in strategies are compiled into the Nginx core and can be enabled via configuration without additional modules. Extended strategies typically require third-party modules for installation.
Overview of Web Workers and their constraints
Web Workers allow JavaScript to create background threads for compute-intensive or high-latency tasks, preventing the main UI thread from blocking.
Key Constraints:
- Same-Origin Policy: The worker script must be same-origin with the main thread script.
- DOM Access: Workers cannot access the DOM,
document,window, orparent. They can usenavigatorandlocation. - Global Scope: The global object is
WorkerGlobalScope, notWindow. While most browsers supportconsole.log, it is not strictly guaranteed by the standard. - UI Restrictions:
alert()andconfirm()are forbidden. - File System: Workers cannot load scripts via
file://protocol; scripts must be served over a network. - Communication: Main and worker threads cannot share memory directly; they must communicate via message passing.
Overview of Svelte framework
Svelte is a frontend framework for building web applications using declarative components that encapsulate templates, styles, and interaction logic. Unlike traditional frameworks like React or Vue, Svelte shifts the majority of its work to a compilation step. It compiles components into highly efficient, small-footprint native JavaScript that manipulates the DOM directly, eliminating the need for a heavy runtime framework in the browser. This results in faster application startup and higher performance.Overview of ES6 Modules (ESM)
ES6 modules are designed to be static, allowing dependency relationships and input/output variables to be determined at compile time. This is more efficient than CommonJS or AMD, which rely on runtime loading (treating modules as objects and looking up properties). ESM uses explicitexportandimportcommands to define interfaces.Overview of IndexedDB for client-side storage
IndexedDB is a low-level API for client-side storage of significant amounts of structured data. Unlike LocalStorage, it is asynchronous, supports transactions, and allows for indexing. It functions as a NoSQL-style database where data is stored in 'object stores' as key-value pairs. Key characteristics include:
- Key-Value Storage: Uses object stores to save JavaScript objects and other data types.
- Asynchronous: Operations do not block the browser UI thread.
- Transactional: Ensures a series of operations either all succeed or all fail (rollback).
- Same-Origin Policy: Databases are isolated by protocol, domain, and port.
- Large Capacity: Generally supports 250MB or more, often with no hard limit.
- Binary Support: Can store
ArrayBufferandBlobobjects.
Overview of Docker Buildx
Docker Buildx is a CLI plugin that extends thedocker buildcommand, powered by Moby BuildKit. It is primarily used for cross-platform builds, allowing developers to create images for multiple CPU architectures (e.g., x86_64, ARM64, ARMv7) from a single machine using QEMU emulation. Key advantages over traditionaldocker buildinclude concurrent multi-platform builds, advanced cache management (local, registry, or volumes), and the automatic creation of manifest lists for multi-arch images.Overview of the Nuxt Framework
Nuxt is a next-generation framework based on Vue.js designed to simplify the creation of Server-Side Rendered (SSR), Static Site Generated (SSG), and Single Page Applications (SPA). It focuses on improving developer experience, performance, TypeScript support, and full-stack capabilities.Overview of NestJS Framework
Nest (NestJS) is a progressive Node.js framework for building efficient, scalable server-side applications. It is built with and fully supports TypeScript (while allowing plain JavaScript) and incorporates elements of Object-Oriented Programming (OOP), Functional Programming (FP), and Functional Reactive Programming (FRP). By default, Nest uses Express as its HTTP server, but it can be optionally configured to use Fastify. It provides an architectural abstraction layer over these frameworks while still exposing their underlying APIs to developers.Overview of Docker containerization
Docker is an open-source application container engine that allows developers to package applications and all their dependencies into a standardized, portable container. This ensures consistent behavior across different environments, including local development laptops, test servers, and production cloud servers, eliminating compatibility issues and simplifying the software delivery pipeline.Overview of Browser Touch APIs
The browser's Touch API consists of three primary components used to handle touch-screen interactions:
- Touch: Represents a single touch point (e.g., one finger or a stylus), including its position, size, shape, and pressure.
- TouchList: A collection of multiple
Touchobjects, used for multi-touch interactions. - TouchEvent: An event instance triggered by a touch action.
Note on Event Triggering: Touch events often trigger mouse events simultaneously to maintain compatibility with legacy code. To prevent the browser from emitting subsequent mouse events after a touch event, call
event.preventDefault().Overview of JavaScript and TypeScript Data Types
JavaScript and TypeScript share a core set of types, but TypeScript extends these with additional type-system constructs for better type safety and flexibility.JavaScript Types
- string, number, boolean, null, undefined, bigint, symbol, object (includes Array, function, Date, Error, etc.)
TypeScript Specific Types
- any, unknown, never, void, tuple, enum
- Custom types defined via
typeorinterface
Overview of Docker and Containerization
Docker is an open-source containerization platform that packages applications and their dependencies into lightweight, portable containers. This ensures consistent operation across different environments ("Build, Ship, and Run Any App, Anywhere"). Key advantages include fast startup times, low resource consumption, environment isolation, and easy integration with orchestration tools like Kubernetes.