<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    
    <title>Thach Le&apos;s Homepage</title>
    
    
    <link>https://thachlp.github.io/</link>
    <atom:link href="https://thachlp.github.io/feed.xml" rel="self" type="application/rss+xml" />
    
    
      <item>
        <title>2024 Recap</title>
        <description>
          
          In 2024, the year unfolded similarly to 2023. I continued to focus on working, learning, and making meaningful contributions to open source projects.

Let’s see 2025!

        </description>
        <pubDate>Sat, 04 Jan 2025 00:00:00 +0700</pubDate>
        <link>https://thachlp.github.io/2025-01-04-2024-recap/</link>
        <guid isPermaLink="true">https://thachlp.github.io/2025-01-04-2024-recap/</guid>
      </item>
    
      <item>
        <title>Beautiful log test on Gradle</title>
        <description>
          
          When executing tests in a Gradle project, it is very helpful to see detailed information from the test logs, such as the package name, class, test name, result, and execution time like this:



Setting up the test-logger plugin is very simple. Just add the plugin and configuration to your build.gradle file:

    plugins {
        // Check the compatibility with gradle version
        id &quot;com.adarshr.test-logger&quot; version &quot;4.0.0&quot;
    }

    testlogger {
        theme &apos;mocha&apos;
        slowThreshold 500
    }


        </description>
        <pubDate>Fri, 26 Jul 2024 00:00:00 +0700</pubDate>
        <link>https://thachlp.github.io/2024-07-26-beautiful-log-test-on-gradle/</link>
        <guid isPermaLink="true">https://thachlp.github.io/2024-07-26-beautiful-log-test-on-gradle/</guid>
      </item>
    
      <item>
        <title>Changes Capture Data using Apache Kafka &amp; Debezium from MySQL</title>
        <description>
          
          Debezium is a set of distributed services to capture changes in our databases so that our application can see those changes and respond to them (CDC).



I set up a CDC for MySQL, you can reference the setup here.

When consuming the change events from Kafka, I created a Java application to consume the messages and convert Kafka events to SQL statements.

This approach helps me monitor the results more easily.
You can reference the consumer source code here

Learn more:
https://debezium.io/documentation/reference/2.7/index.html

https://www.infoq.com/presentations/data-streaming-kafka-debezium

        </description>
        <pubDate>Wed, 17 Jul 2024 00:00:00 +0700</pubDate>
        <link>https://thachlp.github.io/2024-07-17-cdc-with-debezium-kafka-from-mysql/</link>
        <guid isPermaLink="true">https://thachlp.github.io/2024-07-17-cdc-with-debezium-kafka-from-mysql/</guid>
      </item>
    
      <item>
        <title>Database Replication in MySQL</title>
        <description>
          
          Replication Replication means keeping a copy of the same data on multiple machines that are connected via a network. We assume that our dataset is small enough to hold a copy of the entire dataset. Benefits of replication include: Reducing latency by keeping data geographically closer to users. Increasing availability by allowing the system to continue working even if some parts fail. Scaling out the number of machines that can serve read queries and thus increase read throughput. Leader and follower Each node that stores a copy of the database is call a replica, every write to the database needs...
        </description>
        <pubDate>Sun, 07 Jan 2024 00:00:00 +0700</pubDate>
        <link>https://thachlp.github.io/2024-01-07-database-replication-in-mysql/</link>
        <guid isPermaLink="true">https://thachlp.github.io/2024-01-07-database-replication-in-mysql/</guid>
      </item>
    
      <item>
        <title>2023 Recap</title>
        <description>
          
          Today is the last working day of 2023, and it’s time to look back at what I have accomplished this year: Work Continued working at Line VN as a Software Engineer. Applied ChatGPT at work. Made some minor contributions to open-source projects: Central Dogma, Mockito, and Spring. Learn Completed several courses on Redis University, including Redis for Java Developers and Redis Streams. Became a beginner at MongoDB and Elasticsearch. Wrote some technical blogs at my GitHub Pages site. Re-read “Designing Data-Intensive Applications.” Kept up with Duolingo and Cambly to improve my English. Family Learned to become a father, spending most...
        </description>
        <pubDate>Fri, 29 Dec 2023 00:00:00 +0700</pubDate>
        <link>https://thachlp.github.io/2023-12-29-2023-recap/</link>
        <guid isPermaLink="true">https://thachlp.github.io/2023-12-29-2023-recap/</guid>
      </item>
    
      <item>
        <title>Experience working with NULL in MySQL</title>
        <description>
          
          Last week, I encountered a scenario that perfectly illustrates the quirks of working with NULL values in MySQL. I thought it might be beneficial to share my experience, as it could save someone else a bit of head-scratching. We maintain two separate database instances—let’s call them instance1 and instance2. Instance2 was originally cloned from instance1, but since they power different web pages, their data has diverged over time. During a routine check on our testing system, I ran the following queries to get a user count from each instance: -- Query 1: SELECT COUNT(*) FROM instance1.usr_users; -- Result: 152,563 --...
        </description>
        <pubDate>Sat, 02 Dec 2023 00:00:00 +0700</pubDate>
        <link>https://thachlp.github.io/2023-12-02-experience-working-with-null-in-mysql/</link>
        <guid isPermaLink="true">https://thachlp.github.io/2023-12-02-experience-working-with-null-in-mysql/</guid>
      </item>
    
      <item>
        <title>Understanding L4 and L7 Load Balancing</title>
        <description>
          
          In the internet, where traffic constantly increases, load balancing is crucial in distributing network traffic across multiple servers. This ensures that no single server bears an excessive load, thereby improving the responsiveness and availability of applications. Two types of load balancing are commonly used: Layer 4 (L4) and Layer 7 (L7) load balancing. What is L4 Load Balancer L4 load balancing operates at the transport layer (Layer 4) of the Open Systems Interconnection (OSI) model. Layer 4 load balancing allows NGINX to distribute traffic based on network information such as IP address and TCP port. The stream { ... }...
        </description>
        <pubDate>Sun, 29 Oct 2023 00:00:00 +0700</pubDate>
        <link>https://thachlp.github.io/2023-10-29-understand-l4-and-l7-load-balancing/</link>
        <guid isPermaLink="true">https://thachlp.github.io/2023-10-29-understand-l4-and-l7-load-balancing/</guid>
      </item>
    
      <item>
        <title>Understanding and Resolving Spring DataBufferLimitException</title>
        <description>
          
          In the world of Spring Webflux, you may encounter a DataBufferLimitException. This exception can be a bit perplexing if you’re not familiar with how Spring handles data streams. In this blog post, I’ll demystify this exception, explain why it occurs, and provide a solution on how to resolve it. What is DataBufferLimitException? When you send a request to an API and receive a response, the data in the request or response body is managed as a stream of DataBuffer chunks. Spring Webflux has a default limit on the number of bytes that can be buffered whenever the input stream needs...
        </description>
        <pubDate>Wed, 30 Aug 2023 00:00:00 +0700</pubDate>
        <link>https://thachlp.github.io/2023-08-30-understanding-and-resolving-spring-databufferlimitexception/</link>
        <guid isPermaLink="true">https://thachlp.github.io/2023-08-30-understanding-and-resolving-spring-databufferlimitexception/</guid>
      </item>
    
      <item>
        <title>Understanding Collation in MySQL</title>
        <description>
          
          Collation rules in MySQL define the sequence in which characters are sorted and how they match. These rules are crucial for data retrieval, comparison, and sorting operations. The default collation in MySQL varies depending on the version you are using. Default Collation in MySQL For MySQL versions from 5.5.3 to 5.7, the default collation is utf8mb4_general_ci for the utf8mb4 character set. This collation is case-insensitive, making it an excellent choice for general international Unicode data. However, it’s important to note that it does not support accent-sensitive comparisons. On the other hand, for MySQL 8.0 and later versions, the default collation...
        </description>
        <pubDate>Fri, 18 Aug 2023 00:00:00 +0700</pubDate>
        <link>https://thachlp.github.io/2023-08-18-understanding-collation-in-mysql/</link>
        <guid isPermaLink="true">https://thachlp.github.io/2023-08-18-understanding-collation-in-mysql/</guid>
      </item>
    
      <item>
        <title>Git revert commits from fork repository</title>
        <description>
          
          Sometimes, while working on a forked repository, you might find yourself needing to revert your repository to match the upstream repository (the original repository from which you forked). Whether you made a mistake or just need to synchronize with the latest changes, you can do this without losing your contributions to GitHub. Here’s a step-by-step guide to help you through the process. Step 1: ensure you are on the main/master branch Step 2: add the original repository as a remote git remote add original https://github.com/line/centraldogma.git Step 3: fetch the latest changes git fetch original Step 4: reset your local branch...
        </description>
        <pubDate>Mon, 06 Mar 2023 00:00:00 +0700</pubDate>
        <link>https://thachlp.github.io/2023-03-06-git-revert-commit-fork-repository/</link>
        <guid isPermaLink="true">https://thachlp.github.io/2023-03-06-git-revert-commit-fork-repository/</guid>
      </item>
    
      <item>
        <title>A Comparative Study of Terminologies in ElasticSearch and MySQL</title>
        <description>
          
          Although SQL and Elasticsearch have different terms for the way the data is organized (and different semantics), these analogies can help those with a relational database background understand Elasticsearch. However, it’s important to recognize that these analogies are not perfect, as there are fundamental differences in how each system stores and manages data. Terminologies and data types SQL Elasticsearch Description database index In Elasticsearch, an index is a collection of documents and serves a role similar to a database in SQL. table index In Elasticsearch, an index also serves a role similar to a table in SQL, as it stores...
        </description>
        <pubDate>Fri, 11 Nov 2022 00:00:00 +0700</pubDate>
        <link>https://thachlp.github.io/2022-11-11-sql-vs-elasticsearch/</link>
        <guid isPermaLink="true">https://thachlp.github.io/2022-11-11-sql-vs-elasticsearch/</guid>
      </item>
    
      <item>
        <title>How to maintain Kafka client connectivity</title>
        <description>
          
          When Kafka is running, I mean producer/consumer connected to server and published/subscribed messages normally, what happen when Kafka server is down? Today, to answer this, I try to stop Kafka server (on my local machine): Firstly, the Kafka consumer is still running normally (maybe forever until the server is up), that what I expected. Secondly, the Kafka producer was terminated by these exceptions: Caused by: org.apache.kafka.common.errors.TimeoutException: Topic &amp;lt;&amp;gt; not present in metadata after 60000 ms. The exception was thrown by this config parameter: kafka.max.block.ms is expired, the default is 60000s. Caused by: org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for &amp;lt;&amp;gt;:120010 ms has...
        </description>
        <pubDate>Sat, 04 Jun 2022 00:00:00 +0700</pubDate>
        <link>https://thachlp.github.io/2022-06-04-how-maitain-kafka-client-connectivity-when-the-server-is-down/</link>
        <guid isPermaLink="true">https://thachlp.github.io/2022-06-04-how-maitain-kafka-client-connectivity-when-the-server-is-down/</guid>
      </item>
    
      <item>
        <title>My Journey with Composite Indexes in MySQL</title>
        <description>
          
          In MySQL, if a single index is solely used to weed out rows to be reviewed, I didn’t see much of a difference between a single index and a composite index based on my prior experience. However, I had a personal experience with one last week. I want to share something with you today. My query like: SELECT ... FROM table1 WHERE col1 = A AND col2 = B AND col3 = C join table2 on ... The table1 has around 90M rows, but the SELECT query takes hours to finish. With some investigation, I can determine where is the...
        </description>
        <pubDate>Sat, 06 Nov 2021 00:00:00 +0700</pubDate>
        <link>https://thachlp.github.io/2021-11-06-experience-with-composite-index-in-mysql/</link>
        <guid isPermaLink="true">https://thachlp.github.io/2021-11-06-experience-with-composite-index-in-mysql/</guid>
      </item>
    
  </channel>
</rss>
