I decided to learn Scala when I saw a piece of code written by one of my colleagues. I was amazed with its conciseness. But I failed at my first attempt to learn this language. I know the reason why. I read some stuff without writing enough code. After couple of days, all the syntax was washed out of my head. You have to train yourself to forget some Java syntax for time being while you are writing Scala code and train your fingers with the new syntax. Don’t get drunk with Scala, Drink it slowly!! Don’t expect that after reading a book you would be fully functional to write Scala code for production. If you don’t find these difficulties while learning Scala, you must be a Geek!! I envy you!! But I’m sorry, the following blog post is not for you.
Read more…
Enterprise Search is becoming one of the common requirements of any consumer web application that we build these days. So I thought of learning some stuff in this domain. If you think about open source frameworks providing enterprise search functionality, probably Lucene is the one and only answer that comes to your mind. Lucene is a fully featured full text search engine library. Some other platforms and frameworks are developed that leverages core search functionality of Lucene.
Solr is one of such platforms that provide cool features like token highlighting, faceted search and many many more. Solr runs as a standalone search server and can be integrated into the applications using HTTP/XML API. Solr is typically used (or suggested to be used) when the underlying data that you are trying to index doesn’t change often.
Hibernate Search is a framework built on top of Lucene and Hibernate Core. In the following blog post, I would explain how to integrate Hibernate Search into your application.
Read more…
Recently I was playing around with Spring Integration. To understand any new framework one cannot just rely on documentation. So I created a demo application to try out different features of the framework. Since my main motivation was to understand Spring Integration framework, I wanted to spend minimal efforts in input data generation. So I decided to work with Twitter messages.
Most of you must be familiar with Twitter. Twitter is a service for friends, family, and co–workers to communicate and stay connected through the exchange of quick, frequent messages. There are different clients available to use Twitter. In the sample application, I first read the friends timeline. Then based on the source/client used for tweeting, the tweets are routed to different channels. The tweets originated from “web” are simply logged, while the tweets originated from “Dzone.com” are dispatched using a mail sender. The basic flow of the application is depicted in the following diagram.
Read more…
Recently I presented a talk about Esper at JTeam Tech Meeting. Please go through the slides if you are interested in understanding more about Complex Event Processing and Esper . The first half of the presentation covers conceptual knowledge of Complex Event Processing, its advantages over traditional approaches and use cases. The second part covers API details of Esper – The Open Source CEP Engine written in Java.
Read more…
iText is a library that allows you to generate PDF files on the fly.
In the following blog post I would show how to
1. Create PDF using PDF Template and PDF Form
2. Appending documents
Read more…
Apache Wicket is yet another Java Web Development framework. But the beauty of Wicket is it provides clear separation of concerns. It doesn’t mix markup and java and saves you from adapting to additional expression language. Wicket templates are simple HTML files with only additional wicket attribute wicket:id. This makes it easy for the Java developers to work on the prototypes created by web designers. If you know core Java, its absolutely no problem adapting to Wicket programming model. Wicket comes with a nice quickstart guide and plenty of examples for using different components.
Read more…
Performance tracking and monitoring is often a problem with many applications. Especially in systems with distributed SOA architecture, its difficult to identify the services causing performance hit. So its nice, wise and safe always to profile heavy operations in exterprise applications. Theres always a bad day when suddenly system starts showing its true colors by giving sub-optimal performance in production environment. Life is easy at this point, if all the components have runtime performance metrics available for analysis.
Read more…