New Interest and New Technologies

journey
A lot of time has passed since I dumped my mind to bytes and threw out to the digital universe. Almost 3 years since my last post.

In that time I discovered CrossFit, and have fix my broken body and then broke it again and fixed it again and discovered the capacity of human brain… But more on that some other time.

I have jumped head first into AngularJs and D3 on the front end and to Dropwizard on the back end. Then found big data to be fun and big data in real time to be even more fun. I have seen Hadoop and Hbase, Pig and Scoop, Hive and Impala, Flume and Phoenix and then I stepped into Storm and Kafka. What a journey it has been.. and still is. So from now on I will attempt to share at least one step of my journey a week with anyone who will be willing to read my random thoughts.

How to build any Flex project with Ant the right way

Objective

To build flex application with ant without depending on FlexBuilder™ and to have statically linked and dynamically loaded libraries from separate flex projects. Adobe calls them “Component Libraries” and “Runtime Shared Libraries”.

The Problem

Adobe Flex ecosystem is in dark ages of automation and enterprise tools. Their flagship product in automation department is an ant task written by amateur intern. They don’t even bother to escape file paths when the call to mxml compiler are made from this ant task wrapper …(Ask me how I know). So the ant tasks do not work and the documentation for the mxmlc and compc are confusing and cover 50% of the features. But enough about the bad, lets get on to the solution.
Continue reading How to build any Flex project with Ant the right way

Servlet Filer to Log Request and Response Payload

filter

Objective

To have one self containing class that can be plugged into any servlet container. Class will log everything about the request and response, including the payload data coming in and going out.

The Problem

I need to dump out the payload for posts, gets and responses to troubleshoot some issues where data got mismatched between the request and response. Ideal solution would have all this data on one single line. Quick look around gave no off the shelf results, so I put together a quick Filter implementation to capture request and response data.

Continue reading Servlet Filer to Log Request and Response Payload

2011 March 6, SCCA Atlanta Autocross @ Turner Field

After spending 3 years off the course, I pulled out my 87 325is out of a pile of leaves. Battery was dead, but after charging it up the beast came back to life. Old tires where shot, so I went on Buford highway and got some used tires. With runing car now I was able to register for the autox event. Since my schedule limited me to morning session only, I did not spent time trying to figure out what class my BMW supposed to be in and registered tor Time Only morning session.

Continue reading 2011 March 6, SCCA Atlanta Autocross @ Turner Field

Google App Engine – Full Text Search with JDO – Revisited

Objective

This article will show you how to implement a full text search in Google App Engine using JDO. I tried my hand at this couple month ago, but after watching this presentation I decided to do it properly.

The Problem

In my first attempt I managed to get the search working, but after watching Brett Slatkin’s presentaion I realized where the problem is. In short deserializing a list of strings (which is our search index) is a very costly operation, but he presented with a solution. Bellow you will find my solution to this problem.
Continue reading Google App Engine – Full Text Search with JDO – Revisited

Spring JDBC Template – A leaner alternative to fat Hibernate

Objective

This post will show you how to use Spring JDBC Template to perform real world CRUD operations. I hope I can show you that you do not need overweight Hibernate to interact with database of your choice.

The Problem Domain

Almost all application I have coded needed to store and get data of some sort. In most cases it was relational database. With hibernate being all the rage these days I have used it in multiple projects with varying degree of problems and success. In my personal opinion hibernate tries to solve a problem that really is not there. If you can not wire SQL you should not be using Hibernate or be doing any software development.
Continue reading Spring JDBC Template – A leaner alternative to fat Hibernate

Flex Frameworks – PuremVC, Mate, Cairngorm and Robotlegs


Objective

I just wanted to share my thoughts about the frameworks in the Flex environment. You may have noticed that I am in love with Spring when I write Java code, but how about Flex? For a simple example application I go with KISS (keep it stupid simple) approach, but for serious data driven app I utilize a framework.

How to choose a framework that works for You

Firs of all you need to know what you are looking for, because if you do not know where you are going, any path will take you there. When I first started to p[lay with Flex about 3 years ago, I noticed that I need to add some structure to the application. Since I was already using Spring I started looking for a framework. At that point in time there where only two alternatives worth looking at: Cairngorm (heavily pushed by Adobe) and PureMVC.
Continue reading Flex Frameworks – PuremVC, Mate, Cairngorm and Robotlegs

Google App Engine + JAVA + JDO = Simple Search

Objective

This article will show you how to implement a simple search in Google App Engine using JDO engine including searching in child objects.

The Problem Domain

In my application I need to search for data and you probably need to do the same in yours. In Google App Engine you can not query for properties of the child objects. In SQL world this means you can not use “where” clause. So how we can not construct a query which looks at child objects. So how can we implement search in such restrictive environment?
Continue reading Google App Engine + JAVA + JDO = Simple Search

Google App Engine + JAVA + JDO + Inheritance + One-To-Many Relationships

Objective

This article will show you how to persist real world data in Google App Engine. You will learn how to handle inheritance and one-to-many owned relationships in your model objects and store them correctly in the big table implementation of JDO.

The Problem Domain

In my application I need to segregate data by the customer this data belongs to. We will use inheritance in model objects, so all of them will have customer id defined in the base class. We will make the JDO save base class properties in the sub class “table”. We will also learn how to instruct Google App Engine JDO to handle customers with multiple addresses and phone numbers for us. If we define the relationship between model objects correctly JDO will manage storing/retrieving/deleting of these lined objects without our involvement.

Continue reading Google App Engine + JAVA + JDO + Inheritance + One-To-Many Relationships

Google App Engine + JAVA + Spring + REST + Mapping Exceptions to Errors for JSON

error_screenshot

Objective

We are talking REST+JSON from browser to the server and back, so we need to report errors nicely. Exception thrown on the server have to be converted to error messages and transmitted to the client in JSON format. Luckily there is a very elegant solution for this in Spring.

HandlerExceptionResolver interface

Spring provides a very handy HandlerExceptionResolver interface for mapping exceptions to views. If you check the documentation (and you should) you will notice that where are couple exception handlers already implemented, but we will create our own. Just because we can.

Continue reading Google App Engine + JAVA + Spring + REST + Mapping Exceptions to Errors for JSON