Heartbeat Thread in Kafka Consumer

By on Aug 8, 2018 in eng |

Kafka Consumer 0.10.1 has introduced a background thread for sending heartbeat instead of relying on user application thread to keep polling regularly like in the earlier versions.

Stop The World

By on Feb 13, 2017 in eng | 2 comments

I was watching an excellent technical session about Java GC. When the speaker said “Pause is inevitable no matter which collector you use”, a thought suddenly came to my mind that this is also true for living a life.

The long lost happiness

By on Jun 20, 2015 in eng | 1 comment

I took a two days vocation in Koh Samed a months ago. In the second night, I came across a beautiful fire shows on the beach near a restaurant. My Canon 6D was very good with low light so I took a lot of photos. I could not move around easily since the place was crowed so I missed some excellent actions. The show ended leaving me wanting for more. I waited there for a while in hope that there will be a next round but there was no sign of it. While I was thinking about going back to my room, I saw the light of fire from a show in another restaurant like 100 meters away. I grabbed my camera and run.

Instance Confinement

By on Jul 12, 2013 in eng |

I almost forgot that I have this story in my to-be-blogged list. I was assigned to perform performance tuning on a system in my previous project. I found a concurrency bottleneck and rearrange the synchronization pattern to gain noticeably throughput. I later had a chance to read about the Instance Confinement technique which could be applied with the case. The technique uses the normal object encapsulation to make the code easier to understand in term of concurrent access aspect.

What I want to tell my junior colleague

By on Jul 6, 2013 in eng | 1 comment

I gave a talk in the internal un-conference in my organization. The original title is “What I want to tell my junior developers” since I aimed to talk mostly about technical things. It turned out that the top ranks of my topics were about non-technical stuff but I didn’t get a chance to change it when I gave the talk that day. The topics are about some of my observations and perspectives toward things that I want to share with my junior staff. Here is the content of topics I have presented in the session.

Should it know that information

By on Jun 9, 2013 in eng |

A couple sprints ago I did a small refactoring on a piece of code. The code is short but able to clearly express the concept of distributing knowledge between objects

Cut it out and run

By on Mar 10, 2013 in eng | 3 comments

One of the big gaps between seasoned developers and the less experienced ones is the troubleshooting skill. Unlike any other knowledge, this kind of skill is difficult to teach and learn. Developers invest tons of hours to develop his or her own techniques in gathering information and seeing through details to find the root cause of the problem. Sometimes the problem is new or you don’t have enough knowledge in the tool or system that you are working on. This may lead to the dead end that you have run out of all the ideas. I have one simple technique I often use when I cannot think of anything else I can do.

Spring WebApplicationContextUtils

By on Feb 17, 2013 in eng | 3 comments

Last week I tried to find a way to access a spring bean from ServletContextListener. There are some interesting details that I want to log in here for later reference.