What kind of Ethereal Wind blew you in🍃!
Come on in and see if anything catches your eye, my dear friend😉.
Come on in and see if anything catches your eye, my dear friend😉.
The digital piano I currently use is a KAWAI ES105 (which fellow players describe as the “un-neutered” half-pedal version). Today I passed by a music store in Nanjing and, while I was there, tried out four digital pianos: ROLAND FP30X YAMAHA P-125 KAWAI CA-30 ROLAND HP704 1. Overall First Impression: The Difference Is in the Sound, Not the Keyboard After trying all four, my first takeaway was: The biggest difference between them isn’t the key feel — it’s the built-in speaker sound. ...
These interview questions were collected from every corner of the internet How do you locate a slow query? Approach 1 Open-source tools Arthas Ops tools Prometheus Skywalking Approach 2 MySQL’s built-in slow log (has a performance cost) How to enable the slow log /etc/my.conf slow_query_log long_query_time A SQL statement runs slowly — how do you analyze it? Reasons for slowness Aggregate queries Multi-table queries Queries on tables with too much data Deep pagination queries How to analyze the slowness The explain / desc command How to read the result? The extra optimization hints using where; using index — the lookup used an index, and the needed data is all in the index columns, so no back-to-table lookup is needed using index condition — the lookup used an index type index, all — need optimization Do you know about indexes? What is an index? An index is a data structure (ordered) that helps MySQL fetch data efficiently. Beyond the data itself, the database system maintains data structures that satisfy specific search algorithms (such as B+ trees); these structures reference (point to) the data in some way, so advanced search algorithms can be implemented on them. Such a data structure is an index. ...
Didn’t study, know nothing, 😁 then just face it with a smile. Studied, but still don’t get it, 😣 straight-up system crash. Didn’t study, yet somehow still know it, 😎 don’t ask — I’m just that street-smart. Studied and get it, but still get the questions wrong, 🤡 four years of college down the drain, kind of a waste, and tiring too. Know nothing, yet ace every single question, 👽 must be tech pulling the strings, charges at every turn, awfully pricey. ...
Redis’s LFU (Least Frequently Used) eviction policy is an “upgraded” approximate algorithm built on top of LRU. It reuses the same 24-bit lru field in the object header and, through clever encoding and logarithmic counting, achieves an approximate tracking of access frequency at a tiny memory cost. Below we examine it point by point: from the storage structure, to counter increment/decrement, to the eviction decision, to parameter configuration. 1. The bit layout of the 24-bit field Every Redis object has an lru attribute (24 bits). In LFU mode it no longer holds a second-level timestamp but is split into two parts: ...
These notes are organized around the core knowledge points of the exam syllabus, with code examples and memory mnemonics — good for a final sprint review. (The exam is China’s “Soft Exam” — Computer Technology and Software Professional Qualification — System Architect level.) 1. Laws, Regulations, and Standardization 1.1 Copyright Category Content Not protected Government documents, laws and regulations, current-affairs news Protected Speeches, authored books, software code When it vests Automatically arises from the day software development is completed Protection term 50 years (attribution, modification, and integrity rights are protected permanently) Copyright ownership rules: ...
1. Fundamentals 1.1 Origin: Lucene Lucene: Apache’s open-source Java full-text search engine library. Advantages: easy to extend, high performance (pure Java, embeddable). Drawbacks: complex to use — you must handle low-level details like index creation and query parsing, with no distributed support. Elasticsearch is built on Lucene, providing a distributed, easy-to-use RESTful API. 1.2 The tech stack (ELK) Elasticsearch: the storage, search, and analytics engine. Logstash: a server-side data processing pipeline that collects and transforms data before sending it to ES. Kibana: a visualization platform for building charts and dashboards and managing ES. Beats: lightweight data shippers that send to Logstash or ES. 1.3 Installing with Docker Elasticsearch (single node): ...
Compiled for the Solutions Architect certification, from a Java backend perspective. Core idea: what pain point each service solves, when to choose it, and how to distinguish it from similar services. 1. Storage 1.1 Comparison of the three storage types Type Representative service Access unit Typical scenario Block storage EBS, EC2 Instance Store Block Databases, OS disks File storage EFS, FSx Files / directory tree Multi-instance sharing, NFS/SMB mounts Object storage S3 Object (Object + Key) Static assets, backups, data lakes Block storage → like a local hard drive; the OS sees a raw device it formats and mounts itself File storage → like a NAS; multiple machines can mount the same directory at once Object storage → like HTTP PUT/GET key-value; no directory concept, simulated with prefixes 1.2 Amazon S3 Quick reference of core features: ...
1. Service Decomposition and Remote Calls 1.1 Why decompose into services? As business grows, a monolith faces slow deployment, poor scalability, a frozen tech stack, and more. Microservices split it into small, independently deployable and scalable services, each responsible for a single business domain. Decomposition principles: Single responsibility: each service does one thing High cohesion, low coupling: tight within a service, loose between services Data independence: each service owns an independent database 1.2 The user-login flow (from a microservice view) Client → Gateway (auth) → business microservice A → microservice B (OpenFeign) ↓ Nacos (service discovery) 1.3 RestTemplate — the raw inter-service call RestTemplate is the HTTP client Spring provides for inter-service calls, but its code is verbose and it doesn’t support load balancing — a transitional solution before OpenFeign. ...
1. The Spring IoC Container 1.1 Container architecture BeanFactory (top-level interface) └── ApplicationContext (the commonly used interface, extends BF) ├── ClassPathXmlApplicationContext (XML config) ├── FileSystemXmlApplicationContext (filesystem-path XML) └── AnnotationConfigApplicationContext (annotation config) Core differences between BeanFactory and ApplicationContext: Feature BeanFactory ApplicationContext Bean init timing Lazy (on the first getBean) Eager (at container startup) Features Basic IoC IoC + event publishing + i18n + AOP, etc. Use case Extremely resource-constrained embedded 99% of business scenarios Why doesn’t ApplicationContext have close()? The ApplicationContext interface itself doesn’t define close(), to keep the interface general (not all containers can/need to be closed, e.g. web containers). But its implementation AbstractApplicationContext implements Closeable, so you can cast and call it, or receive it via the ConfigurableApplicationContext interface. ...