I was confused when I first learned about Java ReadWriteLock. I thought read operation here is strictly for just reading data.
Continue readingPost Category → programming
Kafka slow consuming and messages duplication
Kafka is super fast. One design tradeoff to achieve very high through put is to put more responsibilities on client side. The underlying concept of messages fetching in Kafka client API is simple enough. But there are many behavior of the API that could be well understood only by spending some time studying how it… Continue reading
Declarative Style in Reactive Programming – Take 3.2
This is the second part of my story about a bug I have created due to the lack of understanding on Spring reactor operators. I have described the basic of the operators in part1. This post will just show the simplified version of the real code. I have preserved all important components in the code… Continue reading
That code jumps too much
“That code jumps too much” my colleague said to me once while reading my code. I just acknowledge his observation and didn’t say anything. I knew his style was more about putting logics closely together. The style tends to result in longer code in minimal number of methods. I prefer breaking logic to small methods… Continue reading
Declarative Style in Reactive Programming – Take 3.1
Just experienced a bug in my code that related to how I composed reactive publisher. The underlying issue is not that complicated but the way it manifest itself in reactive style is quite interesting. I will share the details in 2 blog posts. This post is the first part explaining basic of the building block… Continue reading
Declarative Style in Reactive Programming – Take 2
Reactive programming is tricky. I have written about it before here. It is not just learning a library and choose methods to use. It require changing the logic flow to be declarative and that need some time to practice. I have been using reactive programming for almost a year and still find myself creating bugs… Continue reading
Deadlock in Real Case Example
Many years ago ( 2010 ), I have blogged about a time I experienced a deadlock issue in my project. I have revisited the blog again when I was moving content to new hosting. I felt like the post was too long and not focus. I decided to re-write in here to make it more… Continue reading
Kafka offset commit with lots of partitions
My team just had a problem with our shared Kafka cluster. Logstash processes in centralized-logging system were getting unstable and crashing. These Logstash sends logs to Kafka as a buffer before consuming the messages out and insert to ES. My colleague were suspecting that one of our new deployed application could be the cause of… Continue reading
Read logs and solve things
Imagine you and your friend are trying to use a high-tech microwave for the first time. Your friend push some buttons and it doesn’t seem to get the machine going. He then turn to you ask if you know what is wrong with this thing. All you can do is saying “I don’t know” and… Continue reading
Declarative style in reactive programming
My team has adopted reactive programming in our new project. We are using Spring WebFlux to serve data over REST call. The whole team is new on this programming style. The most essential concept I find myself struggling with is the declarative style of reactive programming The following made-up example in Kotlin below show typical… Continue reading