Elysiamoon Blog
website·Indexed 30 days ago
https://blog.elysiamoon.com/A personal technical blog featuring guides and notes on Java, Spring framework (including Spring Security and IoC/DI), Kubernetes (Pods and Containers), Web3 fundamentals, and cloud-native technologies. It also includes practical tutorials on Hexo deployment, Netlify serverless functions, and Apache PDFBox 3.0.
What's inside Elysiamoon Blog
- Activiti, Flowable, and Camunda are Java-based workflow frameworks derived from JBPM. They use BPMN 2.0 (Business Process Model and Notation) to describe process information, which is fundamentally stored as XML files. These engines typically require external Modeler tools or official platforms for drawing process diagrams, as built-in designers are no longer provided in recent versions.
Overview of gRPC Framework
gRPC is a modern, open-source, high-performance remote procedure call (RPC) framework developed by Google. It is designed to run in any environment and efficiently connect services within and across data centers. It provides pluggable support for load balancing, tracing, health checks, and authentication, and is suitable for distributed computing connecting devices, mobile applications, and browsers to backend services.Overview of gRPC core design and features
gRPC is a high-performance, open-source RPC framework developed by Google that enables efficient communication between services across data centers and connects mobile apps or browsers to backend services. It provides pluggable support for load balancing, tracing, health checks, and authentication.
Core design components:
- Network Communication: Encapsulated communication supporting multiple programming languages.
- Protocol: Uses HTTP/2 for transport, enabling binary data transfer and full-duplex (bi-directional) streaming.
- Serialization: Uses Protocol Buffers (protobuf) for efficient data serialization.
- Proxy Creation: Uses stubs to allow callers to invoke remote methods as if they were local methods.
Overview of Liquibase database migration
Liquibase is a tool for managing database scripts and migrations across multiple environments. It supports four file formats for defining changes: SQL, XML, YAML, and JSON. While SQL is most intuitive for single-database projects, XML, YAML, and JSON are recommended for projects that may migrate between different database types. Liquibase does not automatically write changes to files; developers must manually add changes to changelogs, which Liquibase then executes automatically upon application startup to synchronize structure and data.Overview of Rust Smart Pointers
Rust provides various smart pointers to manage memory, ownership, and interior mutability. Each serves a specific purpose based on whether the data needs to be on the heap, shared across threads, or mutated while immutable.Smart Pointer Description Strengths Weaknesses *mut T/*const TRaw Pointers Speed, FFI/External interaction Unsafe Box<T>Heap allocation for any type Long-term heap storage Increased size Rc<T>Reference Counted Shared access to values Increased size, runtime overhead, not thread-safe Arc<T>Atomic Reference Counted Thread-safe shared access Increased size, runtime cost Cell<T>Interior Mutability Ability to change immutable values Increased size, performance impact RefCell<T>Interior Mutability Mutable access via immutable references; works with Rc/Arc Increased size, runtime cost, no compile-time guarantees Cow<'a, T>Copy-on-Write Avoids cloning until mutation is required Potential size increase StringDynamic text Dynamic growth, guaranteed encoding Potential memory over-allocation Vec<T>Dynamic array Dynamic growth, ordered data Potential memory over-allocation RawVec<T>Foundation for Vec Memory allocation management Not for direct application use Unique<T>Unique ownership Basis for types requiring exclusive ownership (e.g., String) Not for direct application use Shared<T>Shared ownership Shared ownership management Not for direct application use Overview of Java Microservices Frameworks
There are two primary mature microservices ecosystems in Java: the Spring Cloud integrated toolset and the Spring Cloud Alibaba one-stop solution. Developers can also mix and match individual tools from these sets based on specific business needs.Introduction to Java Flight Recording (JFR)
Java Flight Recording (JFR) is a performance monitoring and fault diagnosis tool provided by the Java Virtual Machine (JVM). It collects, records, and analyzes performance data of Java applications during runtime. JFR was introduced in Java 7 Update 40 and became an open-source project in Java 11 and later versions.Overview of Rime input engine distributions
Rime is a highly customizable input method engine available across different operating systems under different names:
- Windows: Weasel (小狼毫)
- macOS: Squirrel (鼠须管)
- Linux: 中州韵 (ibus-rime)
Additionally, the 'plum' (东风破) tool is available for configuration management.
Understand JTA and XA for Distributed Transactions
XA (eXtended Architecture) is a specification for distributed transaction processing designed to provide atomicity across heterogeneous components using a Two-Phase Commit (2PC) protocol. The Java Transaction API (JTA) is the Java EE standard that allows Java applications and application servers to execute distributed transactions across XA-compliant resources by defining the interface between the transaction manager and the resources.Understand the core benefits of Message Queues
Message Queues (MQ) are used to improve system high availability through three primary patterns:
- Decoupling: Reduces dependencies between systems. A producer pushes a message to the MQ, and other systems subscribe to the topic. The producer does not need to manage the complexities of calling multiple downstream systems.
- Asynchrony: Allows processes to run in the background without blocking the main execution flow.
- Traffic Shaving (Peak Shaving): Protects downstream systems from crashing during high-traffic spikes (e.g., flash sales). Messages are buffered in the MQ and consumed at a steady rate that the database or downstream service can handle, spreading the load over a longer period.
Core Blockchain Principles
Blockchain technology is built on several fundamental pillars:
- Distributed Ledger: A continuous chain of blocks where every transaction is recorded and shared across all network nodes, eliminating the need for a central server.
- Decentralization: Data is distributed across nodes; altering the chain typically requires controlling more than 50% of the network nodes.
- Security & Immutability: Each block contains its own hash and the hash of the previous block. Any change to transaction data alters the hash, making tampering immediately detectable.
- Consensus Mechanism (PoW): Proof of Work requires miners to solve complex mathematical problems (finding a nonce) to validate transactions and create new blocks in exchange for cryptocurrency rewards.
Understand Elasticsearch core concepts
Elasticsearch organizes data using three primary concepts:
- Index: A collection of documents with similar characteristics. Index names must be lowercase.
- Mapping: The process of defining how a document and its fields are stored and indexed, including field names and types.
- Document: The smallest unit of data that can be indexed, represented in a lightweight JSON format.