<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Hoang Duc Kien</title>
    <description>The latest articles on Forem by Hoang Duc Kien (@devhoangkien).</description>
    <link>https://forem.com/devhoangkien</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F997231%2Fb141260e-51c7-435d-889c-94dfaade6ff4.png</url>
      <title>Forem: Hoang Duc Kien</title>
      <link>https://forem.com/devhoangkien</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/devhoangkien"/>
    <language>en</language>
    <item>
      <title>The Hidden Gap Between Good Developers and Great Architects -EP 2</title>
      <dc:creator>Hoang Duc Kien</dc:creator>
      <pubDate>Sat, 25 Oct 2025 13:56:44 +0000</pubDate>
      <link>https://forem.com/devhoangkien/the-hidden-gap-between-good-developers-and-great-architects-ep-2-50nk</link>
      <guid>https://forem.com/devhoangkien/the-hidden-gap-between-good-developers-and-great-architects-ep-2-50nk</guid>
      <description>&lt;p&gt;🎯 “A good developer makes things work. A great architect makes things last.”&lt;/p&gt;

&lt;p&gt;🧠 Why Some Great Developers Never Become Architects&lt;br&gt;
You’ve probably met developers who write elegant, efficient, and clean code — yet when they’re asked to design a scalable system, they freeze.&lt;/p&gt;

&lt;p&gt;It’s not because they lack talent.&lt;br&gt;
It’s because the mindset that builds features is different from the mindset that builds systems.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Mindset Gap
🧩 Good Developer: “How do I make this feature work?”
They focus on delivering functionality that meets the current requirement.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🏗️ Great Architect: “How will this system evolve?”&lt;br&gt;
They think in terms of relationships, flows, and boundaries — anticipating what might break, scale, or change.&lt;/p&gt;

&lt;p&gt;💡 Developers think in lines of code. Architects think in lines of communication.&lt;/p&gt;

&lt;p&gt;🧱 System Diagram: Feature-Driven vs System-Driven Thinking&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/dailybetter/the-hidden-gap-between-good-developers-and-great-architects-ep-2-b32102d67a36" rel="noopener noreferrer"&gt;Read more&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>🚀 NestJS: How Our Team Successfully Migrated from Monolithic to Microservices</title>
      <dc:creator>Hoang Duc Kien</dc:creator>
      <pubDate>Tue, 07 Oct 2025 05:02:05 +0000</pubDate>
      <link>https://forem.com/devhoangkien/nestjs-how-our-team-successfully-migrated-from-monolithic-to-microservices-40n0</link>
      <guid>https://forem.com/devhoangkien/nestjs-how-our-team-successfully-migrated-from-monolithic-to-microservices-40n0</guid>
      <description>&lt;h1&gt;
  
  
  🧩 From Monolithic to Microservices with NestJS — A Real-World Journey
&lt;/h1&gt;

&lt;p&gt;We started with a &lt;strong&gt;Monolithic architecture&lt;/strong&gt; — and it worked perfectly fine.&lt;br&gt;&lt;br&gt;
But as the system grew, we began to hit limits: scalability, tangled dependencies, and deployment bottlenecks.&lt;/p&gt;

&lt;p&gt;So our team decided to take on the challenge:  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Splitting a working Monolithic NestJS system into fully functional Microservices.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And yes — it was &lt;strong&gt;harder than it looked&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ What We Learned
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1️⃣ Don’t start with Microservices
&lt;/h3&gt;

&lt;p&gt;Begin with a stable &lt;strong&gt;Monolithic&lt;/strong&gt; app first.&lt;br&gt;&lt;br&gt;
You’ll understand your business logic deeply before scaling it out.&lt;/p&gt;

&lt;h3&gt;
  
  
  2️⃣ Communication matters
&lt;/h3&gt;

&lt;p&gt;Avoid REST for inter-service communication.&lt;br&gt;&lt;br&gt;
Use &lt;strong&gt;TCP&lt;/strong&gt; or &lt;strong&gt;gRPC&lt;/strong&gt; for lower latency and better reliability.&lt;/p&gt;

&lt;h3&gt;
  
  
  3️⃣ Choose your language &amp;amp; framework wisely
&lt;/h3&gt;

&lt;p&gt;Both &lt;strong&gt;NestJS (Node.js)&lt;/strong&gt; and &lt;strong&gt;Java&lt;/strong&gt; shine here — strong DI/IoC support, structured architecture, and mature tooling.&lt;/p&gt;

&lt;h3&gt;
  
  
  4️⃣ Microservices ≠ automatic success
&lt;/h3&gt;

&lt;p&gt;It adds complexity: larger codebase, higher infrastructure cost, and more coordination.&lt;br&gt;&lt;br&gt;
Only make the move when your &lt;strong&gt;business logic and traffic&lt;/strong&gt; demand it.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Architecture in Action
&lt;/h2&gt;

&lt;p&gt;We started with two core modules running in one service:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🧾 &lt;code&gt;OrdersModule&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;📦 &lt;code&gt;ProductsModule&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then, we &lt;strong&gt;split&lt;/strong&gt; them into independent services that communicate through &lt;strong&gt;TCP transport&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
The &lt;strong&gt;API Gateway&lt;/strong&gt; handles authentication by verifying &lt;strong&gt;JWT tokens&lt;/strong&gt; before routing requests to each microservice.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk73hzsz0ua3jkx9jaitc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk73hzsz0ua3jkx9jaitc.png" alt="Austinkienhhoang" width="800" height="427"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 The Result
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Cleaner separation of business logic
&lt;/li&gt;
&lt;li&gt;Easier deployment and scaling
&lt;/li&gt;
&lt;li&gt;Independent service updates
&lt;/li&gt;
&lt;li&gt;Centralized authentication through the API Gateway
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But we also learned: &lt;strong&gt;don’t chase Microservices for the hype.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Evolve your architecture only when your system truly needs it.&lt;/p&gt;




&lt;h2&gt;
  
  
  📖 Read the Full Story
&lt;/h2&gt;

&lt;p&gt;👉 &lt;strong&gt;Full article with detailed diagrams and step-by-step migration on Medium:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
🔗 &lt;a href="https://medium.com/@austinkienhoang/nestjs-how-our-team-successfully-migrated-from-monolithic-to-microservices-0415b4551338" rel="noopener noreferrer"&gt;NestJS: How Our Team Successfully Migrated from Monolithic to Microservices&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 Before You Go
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://medium.com/dailybetter" rel="noopener noreferrer"&gt;In Daily Better&lt;/a&gt; 🚀&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Thank you for being part of the &lt;strong&gt;Daily Better&lt;/strong&gt; community! 🌱  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;👏 &lt;strong&gt;Clap&lt;/strong&gt; and follow the author if you enjoyed this story.
&lt;/li&gt;
&lt;li&gt;💬 &lt;strong&gt;Follow Daily Better&lt;/strong&gt; for more inspiring tech and self-growth articles.
&lt;/li&gt;
&lt;li&gt;✍️ &lt;strong&gt;Want to write with us?&lt;/strong&gt; Join our writer community and share your story — your experience could inspire someone today.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Written by &lt;a href="https://medium.com/@austinkienhoang" rel="noopener noreferrer"&gt;Austin Hoang&lt;/a&gt; • Backend Developer | NestJS | Microservices | System Design&lt;/em&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>development</category>
      <category>microservices</category>
      <category>nestjs</category>
    </item>
    <item>
      <title>From an IT Student to a Successful Developer: The Story of Those Who Dare to Change</title>
      <dc:creator>Hoang Duc Kien</dc:creator>
      <pubDate>Mon, 28 Apr 2025 13:36:59 +0000</pubDate>
      <link>https://forem.com/devhoangkien/from-an-it-student-to-a-successful-developer-the-story-of-those-who-dare-to-change-29p7</link>
      <guid>https://forem.com/devhoangkien/from-an-it-student-to-a-successful-developer-the-story-of-those-who-dare-to-change-29p7</guid>
      <description>&lt;p&gt;🎯 From IT Student to Successful Developer: The Story of Those Who Dare to Change!&lt;br&gt;
Did you know that 70% of IT students are predicted to be jobless after graduation?&lt;br&gt;
But here’s the real question: Will you be part of the 30% who succeed?&lt;br&gt;
I just shared an honest story about my journey — from a regular student to a developer with a stable, well-paying job. In this post, I dive into:&lt;br&gt;
✔️ A childhood lesson that kept me on the right track&lt;br&gt;
✔️ The real skills you need to survive and thrive in the IT industry&lt;br&gt;
✔️ How to build real-world projects when you don't have an internship&lt;br&gt;
✔️ And most importantly: How to not just find a job — but do it well&lt;br&gt;
👉 If you're studying IT, about to graduate, or feeling stuck in your tech career, I believe this post will give you a fresh, clearer perspective.&lt;br&gt;
Read it here: &lt;a href="https://medium.com/@austinkienhoang/from-an-it-student-to-a-successful-developer-the-story-of-those-who-dare-to-change-779ad52b56cc" rel="noopener noreferrer"&gt;https://medium.com/@austinkienhoang/from-an-it-student-to-a-successful-developer-the-story-of-those-who-dare-to-change-779ad52b56cc&lt;/a&gt;&lt;br&gt;
"We may not be giants, but we can see thousands of miles ahead by standing on their shoulders."&lt;/p&gt;

&lt;h1&gt;
  
  
  ITCareer #Programming #DeveloperLife #Mindset #Growth
&lt;/h1&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>5 Tips for Optimizing the Performance of Your NodeJS Application</title>
      <dc:creator>Hoang Duc Kien</dc:creator>
      <pubDate>Fri, 10 Mar 2023 04:39:12 +0000</pubDate>
      <link>https://forem.com/devhoangkien/5-tips-for-optimizing-the-performance-of-your-nodejs-application-2b68</link>
      <guid>https://forem.com/devhoangkien/5-tips-for-optimizing-the-performance-of-your-nodejs-application-2b68</guid>
      <description>&lt;p&gt;Application performance optimization is the process of improving the speed and efficiency of an application to provide a better user experience. In this article, we will explore some tips for optimizing the performance of your NodeJS application.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Use Caching
&lt;/h2&gt;

&lt;p&gt;Caching is a technique that can significantly improve the performance of your application. By caching frequently accessed data in memory, you can reduce the number of database queries your application needs to make. This can help reduce latency and improve overall performance. Redis and Memcached are popular caching solutions for NodeJS applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Use Asynchronous Programming
&lt;/h2&gt;

&lt;p&gt;NodeJS is built on an event-driven, non-blocking I/O model. By using asynchronous programming patterns, you can maximize the performance of your application by ensuring that your code is non-blocking and can handle multiple requests simultaneously.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Optimize Database Queries
&lt;/h2&gt;

&lt;p&gt;Database queries can be a significant source of performance issues in NodeJS applications. To optimize database queries, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Use indexes to speed up query performance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Avoid fetching large amounts of data from the database by using pagination.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use an ORM like Sequelize or TypeORM to abstract away the complexity of writing SQL queries.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Minimize Network Round Trips
&lt;/h2&gt;

&lt;p&gt;Network round trips can add significant latency to your application. To minimize network round trips, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use a content delivery network (CDN) to cache static assets like images and videos.&lt;/li&gt;
&lt;li&gt;Combine multiple API calls into a single call using batching.&lt;/li&gt;
&lt;li&gt;Use HTTP/2 to reduce the number of network connections needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Monitor and Optimize Resource Usage
&lt;/h2&gt;

&lt;p&gt;Monitoring resource usage is crucial for ensuring that your application is performing at its best. By monitoring CPU usage, memory usage, and other metrics, you can identify potential performance bottlenecks and optimize your code to improve performance.&lt;/p&gt;

&lt;p&gt;In conclusion, optimizing the performance of your NodeJS application requires a holistic approach. By using caching, asynchronous programming, optimizing database queries, minimizing network round trips, and monitoring resource usage, you can significantly improve the performance of your application and provide a better user experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Interview Question
&lt;/h2&gt;

&lt;p&gt;In an interview, I came across the following question: “&lt;em&gt;Could you explain how you would handle a situation where your NodeJS application starts experiencing performance issues?&lt;/em&gt;”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My answer:&lt;/strong&gt; If my NodeJS application starts experiencing performance issues, I would follow these steps to identify and resolve the issue:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First, I would check the server and infrastructure to ensure that there are no external factors contributing to the performance issue.&lt;/li&gt;
&lt;li&gt;I would then use performance monitoring tools such as New Relic or AppDynamics to identify which parts of the application are experiencing performance degradation.&lt;/li&gt;
&lt;li&gt;Next, I would analyze the code and database queries being used in the areas identified by the performance monitoring tools to identify any inefficiencies or bottlenecks.&lt;/li&gt;
&lt;li&gt;I would then make changes to the code and database queries to optimize performance. This may include implementing caching solutions, optimizing database queries, or using asynchronous programming patterns.&lt;/li&gt;
&lt;li&gt;Finally, I would test the application to ensure that the changes made have resolved the performance issues and that the application is running smoothly. If the performance issues persist, I would repeat the process until the issue is resolved.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Here are some interview questions related to optimizing application performance in Node JS:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What is caching, and how can it improve the performance of a NodeJS application?&lt;/li&gt;
&lt;li&gt;How can you optimize database queries in a NodeJS application, and what tools or libraries can you use to help with this?&lt;/li&gt;
&lt;li&gt;How do you ensure that your NodeJS application is non-blocking and can handle a large number of concurrent requests?&lt;/li&gt;
&lt;li&gt;What are some common performance bottlenecks in NodeJS applications, and how can you identify and fix them?&lt;/li&gt;
&lt;li&gt;How can you minimize network round trips in a NodeJS application, and what benefits can this bring?&lt;/li&gt;
&lt;li&gt;How do you monitor the performance of a NodeJS application, and what metrics should you be paying attention to?&lt;/li&gt;
&lt;li&gt;How do you handle a situation where a NodeJS application is experiencing performance issues, and what steps do you take to identify and fix the problem?&lt;/li&gt;
&lt;li&gt;Can you explain the concept of event-driven programming in NodeJS, and how it can help with performance optimization?&lt;/li&gt;
&lt;li&gt;What is HTTP/2, and how can it improve the performance of a NodeJS application?&lt;/li&gt;
&lt;li&gt;How do you optimize resource usage in a NodeJS application, and what tools or techniques can you use to accomplish this?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;In the next article, I will answer the above questions based on my experience.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@devhoangkien/5-tips-for-optimizing-the-performance-of-your-nodejs-application-e6f88b8ff460" rel="noopener noreferrer"&gt;Original post on My &lt;br&gt;
Medium&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1gnxag1l4kz7iae7e2hi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1gnxag1l4kz7iae7e2hi.png" alt="5 Tips for Optimizing the Performance of Your NodeJS Application" width="500" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>webdev</category>
      <category>node</category>
    </item>
  </channel>
</rss>
