Johnycho Computer Science and Database Wiki

website·Indexed 30 days ago

https://johnycho.dev

A technical knowledge base covering computer science fundamentals, database management, and software architecture. Topics include TCP 3-way handshake, Redis distributed locks, transaction isolation levels, Layered Architecture, and Spring Boot Actuator with Micrometer.

Tokens
171.5K
Snippets
474
Records
1.1K
Agent score
50%

What's inside Johnycho Wiki

  1. Overview of SCM System Core Processes

    Supply Chain Management (SCM) systems track the physical movement of goods and record them as data to ensure accurate settlement with suppliers. The core lifecycle of a product in an SCM system typically follows these stages:

    1. Ordering (발주): Requesting a specific quantity of goods from a supplier.
    2. Receiving (입고): The arrival of goods at the warehouse.
    3. Inspection (검수): Verifying the quantity and quality of received goods.
    4. Put-away (적치): Placing verified goods into specific warehouse locations and updating inventory.
    5. Returns/Disposal (반품/회송/폐기): Handling defective or unnecessary goods by returning them to the supplier or discarding them.
    6. Settlement (정산): Calculating and paying the supplier based on the actual quantity of goods received and accepted.
  2. Overview of the Reactive Streams Specification

    Reactive Streams is a common specification for asynchronous stream processing with non-blocking backpressure. It ensures interoperability between different reactive libraries such as Project Reactor (Mono, Flux), RxJava (Observable), and Akka Streams. The primary goal is to solve the problem where a producer is faster than a consumer, preventing memory overflow (OOM) or data loss by allowing the consumer to signal how much data it can handle.
  3. Overview of the C4 Model for Architecture Visualization

    The C4 model is a lightweight visualization framework for software architecture that uses four levels of abstraction to describe a system, similar to zooming in on a map. It is designed to solve the problem of inconsistent architectural diagrams by providing a structured way to communicate design to different stakeholders, from non-technical executives to developers.
  4. Overview of Gradle build automation

    Gradle is a build automation tool used for languages running on the JVM, such as Java, Kotlin, and Scala. It is designed to optimize build speeds using incremental builds, build caches, and daemon processes. It supports multi-project management and provides high extensibility through plugins and custom tasks. Build scripts can be written using either Groovy or Kotlin DSL.
  5. Overview of Test Double types

    A Test Double is an object used in place of a real production object during testing, similar to a stunt double in movies. Depending on the testing goal, different types of doubles are used based on whether they need a real implementation, the ability to verify calls, or the ability to return predefined values.
    TypePurposeReal ImplementationVerifiableReturn Value Configurable
    DummyFill parameters only❌❌❌
    FakeSimple lightweight implementation⭕⭕⭕
    StubReturn fixed values❌❌⭕
    SpyReal implementation + call tracking⭕⭕⭕
    MockVerify expected behavior/calls❌⭕⭕
  6. Overview of RAID technology

    RAID (Redundant Array of Independent Disks) is a technology that combines multiple hard disks or SSDs into a single logical unit to either improve data storage safety (redundancy) or increase performance.
  7. Overview of MySQL Database Replication

    Database Replication in MySQL is a core technology used to ensure high availability and data stability. It involves synchronizing data between a Source server and one or more Replica servers, which is critical for maintaining continuous availability and reliability in large-scale application environments.
  8. Understand and identify Phantom Reads

    A Phantom Read occurs when a transaction executes the same query multiple times and discovers new rows that were not present in the first execution. This happens because another transaction inserted or deleted data between the first and second reads. Note: In systems supporting MVCC (Multi-Version Concurrency Control), phantom reads may be prevented depending on the isolation level.
    -- Transaction A starts
    START TRANSACTION;
    
    -- First query: finds existing rows
    SELECT * FROM orders WHERE amount > 150;
    
    -- Transaction B starts and inserts a new row
    START TRANSACTION;
    INSERT INTO orders (customer_id, amount) VALUES (4, 250);
    COMMIT;
    
    -- Transaction A executes the same query again
    -- A new row (inserted by B) now appears, causing a Phantom Read
    SELECT * FROM orders WHERE amount > 150;
  9. Understand Micrometer and its role in Spring Boot

    Micrometer is a vendor-neutral metrics instrumentation library that collects various application indicators such as CPU usage, memory consumption, HTTP requests, and custom events. It acts as a facade, providing a consistent API to send metrics to multiple monitoring systems like Prometheus, Datadog, and Graphite while hiding the complexity of specific backend implementations.

    Relationship with Spring Boot Actuator: Spring Boot Actuator provides management endpoints for health checks, environment, and logs. Internally, Actuator uses Micrometer to collect JVM, HTTP, and database metrics. Actuator serves as the monitoring and management interface, while Micrometer handles the actual measurement and transmission of data to monitoring systems.

  10. Understand Serverless Computing concepts and benefits

    Serverless computing is a cloud model where the provider manages the infrastructure, including OS maintenance, security, and file system management, while dynamically scaling resources. Key benefits include the elimination of manual server management, flexible scalability, and a cost model where users only pay for the capacity they actually use. Examples of serverless services include AWS Lambda (computing), S3 (storage), and SQS (message queuing).
  11. Understand Multi-Version Concurrency Control (MVCC)

    MVCC is a concurrency control method that maintains multiple versions of data, allowing transactions to read and write simultaneously without blocking each other. Each transaction reads from a consistent snapshot based on its start time, ensuring that changes from other concurrent transactions are not visible.

    Key characteristics include:

    • High concurrency: Read operations do not require locks and are not delayed by write operations.
    • Consistency: Maintains a consistent view of data based on the transaction start point.
    • Phantom Read prevention: Uses Gap Locks and Next-Key Locks to prevent phantom reads.
    • Trade-off: Requires more storage space to maintain multiple versions of the data.
  12. Understand ACID properties for database transactions

    ACID is a set of properties that guarantee database transactions are processed reliably. It consists of four key principles:

    1. Atomicity: Ensures that all operations within a transaction are completed; if any part fails, the entire transaction is aborted and rolled back (all-or-nothing).
    2. Consistency: Ensures that a transaction brings the database from one valid state to another, maintaining all predefined rules and constraints.
    3. Isolation: Ensures that concurrently executing transactions do not interfere with each other. Intermediate states of a transaction are invisible to other transactions.
    4. Durability: Ensures that once a transaction is committed, it remains committed even in the event of a system failure, typically achieved through transaction logs.