Hiep Doan

Hiep Doan

Written by Hiep Doan, a software engineer living in the beautiful Switzerland. I am passionate about building things which matters and sharing my experience along the journey. I also selectively post my articles in Medium. Check it out!

Contract testing with Spring Cloud Contract (part 2)

October 18, 2020

  • contract-testing
  • spring-boot
  • pact

In the [last part](https://alexthered.me/blog/contract-testing-for-spring-boot-apps-part-1/), I have briefly introduced the concept of contract testing and why we need it. This article will look into how we can use the Spring Cloud Contract to enforce contract testing between Spring-boot microservice apps.

Contract testing for Spring-boot apps (Part 1)

October 11, 2020

  • contract-testing
  • spring-boot
  • pact

Contract testing is a set of automated tests that verify the interaction between two services (either through REST API or asynchronous message systems). It is different from unit and integration tests (which verify the operation within one service) and end-to-end test (which aims to validate the operation across UI and possibly multiple internal services).

Self-reflection during COVID-19 lockdown

April 18, 2020

  • productivity
  • covid19
  • reflection

It's a strange time, isn't it? All around the world million of million people are being put in some forms of lockdown, all thanks to the COVID-19. Everywhere companies have started remote working and more and more employees are copped up at home, instead of rushing to the office in the morning.

Best practice to configure your RabbitMq cluster hosted with GCP's Kubernetes engine

April 13, 2020

  • rabbitmq
  • kubernetes

This article discusses few best practices that we have used with our RabbitMq cluster hosted with GCP's Kubernetes application. Note that every configuration comes with a certain trade-off. It might work for us but not necessarily for your different requirement and workload.

Proper API error handling for Spring boot App

June 09, 2019

  • spring-boot
  • api

Error handling is a very important part of a reliable and user-friend API. If you think of your API as a product, when something goes wrong with the product, it should clearly indicate the error to users and the reason why. Also, it should be able to guide users to avoid that error from happening again.

Why you should split your Kubernetes-hosted backend app into API and worker mode

May 29, 2019

In a world of monolithic architecture, it's very common that backend application does not just receive and respond to API request, but also perform scheduling job such as data cleaning, notification sending… In addition, the same app can also take the job from the queue and execute it

How to monitor your Redis-based job queue system?

May 04, 2019

It's very common use case these days to use Redis for your queue processing. But what is the best way to monitor the system?

How to register a custom list serializer with Spring Boot / Jackson

April 20, 2018

Recently, I ran into a situation where I wanted to customize the Json serialization of a list in an API response.TL/DR: you can find the full source code on my github: https://github.com/alexthered/spring-jackson-custom-list-serializer

The life lessons at a gym

June 26, 2017

Probably people do not go to gym to contemplate. Neither do I, I go to gym to work out, get myself recharged and wake my muscle up after hours of sitting rather static in front of the computer.

Dare to be rejected

April 28, 2017

Let me say it upfront: there is nothing fun in being rejected. Either it’s the rejection of the school that you want to study at, the company that you’re keen on working for or a request of salary bonus, they all felt somewhat disappointed and ashamed.

What did I learn recovering from ACL injury?

April 28, 2017

There is always something good in a bad thing. Nearly a year ago, I ruptured my anterior cruciate ligament (ACL) during a football match, which then followed by an al......