I was worried about how to measure the performance of a feature in Java. I was overwhelmed by the complexities of the JVM that might affect my results. Before I could finish my experiments, I wanted to have a look at some of the parameters that I need to take care of before I finally go ahead with my Microbenchmarking results.
I came across this excellent article Dynamic Compilation and Performance Measurement by Brian Goetz. It is an excellent introduction and gives good insights about the ways the JVM works.
I will find out some time later to publish a blog about how I did some of my experiments after reading this.
I have been investigating networking frameworks over the weekend, mainly JBoss’s Netty and Apache MINA. This has been a good experience after having studied and implemented all the transport layer protocols like TCP/IP and UDP in my Networks course in college. The change took some time. Initially, I was thinking from the ground that we will need to make a session layer and make our new application level protocols over that. The discussions with my manager were all going great and I was really happy with the solutions I was coming up with. Until, finally during a scrum he told me that now you can lookup Netty framework and that will probably solve the purpose.
My first reaction was a shock because that nullified my efforts over the last week. Then I cursed myself over the fact that my literature survey was not good and should have been done first. Finally, the feeling sank in and I realized that it was good that I thought about the whole problem rather than looking at the solution myself. This is probably an effect of reading Head First Design Patters. 🙂 You will understand from my book review post. 🙂
In this post I will list down the reasons why I like Netty. This is an initial assessment and I will update this post.
- Netty has an excellent documentation. That makes it easy to leverage its functionality. The time to market gets reduced because the developer can get production quickly.
- The Netty Buffers are faster as they have made good use of the OO composition principle to implement zero copy strategies.
- Netty uses Intercepting filter patterns which makes the controller code maintainable and reduces the complexity on the developer side. Look here to understand the intercepting filter pattern.
- Code maintainability is also made easier by the availability of decoder and encoders.
Have you ever taken an interview with a good tech company, may be Amazon, Google or Microsoft ? No, I am not saying that in order to do that you need to read this book first. But, then you must have realized, how you have to solve a problem on your own with some hints from the interviewer. The main job of the interviewer will be to direct you to the solution. He will discuss the pros and cons, set the objectives of the solution, and tell you whether you are going towards that or not.
The reason why I talk about interviews is that I am fresh out of college. This is probably the way you will think,understand and engineer new designs and suggest better algorithmic solutions in your job. This book does exactly that.
It makes you think and it helps you come up with the solutions. That enhances your learning. All the design patterns in this book are like real life case studies of evolution. The reader will see how the initial system was designed, how the problems arose while scaling up and how the solutions address those problems. One inherent problem about learning design patterns is that you try to use them anywhere and everywhere. However, when you learn them with such a grounded approach, you will first try to see the problem and not the solution.
Overall, this book is an excellent read and is highly recommended.