Insights and perspectives to keep you updated.

Long Methods? Try Compose Methods

We all have seen long winding code that goes on and on. By the time you have hit page down a couple of times, you forget what the method was doing. You forget because the method is doing a lot. It is failing the SRP principle and needs to be broken down into smaller pieces. According to me if you are looking at a method Continue Reading

bookMyHours.com Public Beta Released

bookMyHours.com is a simple and clean enterprise timesheet application offered as SaaS on a subscription basis. The service is ‘rightweight‘ and consists of the most frequently used features so that the organizations do not have to pay for features that they would never use. It is a multi-tenant application which allows and organization to define their custom look and feel. bookMyHours is based on eHour, Continue Reading

Managing Cold Start On Google App Engine

One of the major problem working on Google App engine is managing cold start. Well what is it? Google App engine spins down the application when it is idle. On Google App engine, application does not get a permanent instance of java virtual machine. If there are no activities for a while then the JVM goes cold and application will have to start again to Continue Reading

What is the Correct Caching Strategy?

While uncovering ways to speed up our application on the Google App Engine, we decided to use Memcache. This led us to an interesting discussion which I am reproducing here to get your inputs. As you would observe, if you are following our blog, that there are 2 potential ways to cache, invasive and non-invasive. May be there is a third way which you would Continue Reading

Google App Engine: Understanding Non-Invasive Caching

In the last post on understanding caching we talked about the general support of GAE for caching and how we could easily incorporate caching in our application. You would also recollect that we talked about the invasive form of caching in which the business layer was aware about the caching framework. In this post let us talk about the non-invasive way to cache. Since caching Continue Reading

Improve Performance By Using Batch Gets on Google App Engine

We are porting a JPA application to Google App Engine. One of the challenges we faced during this exercise was performance. There are simple and effective ways by which we can increase the performance of our application. Datastore batch get is one such optimization we used during porting the application. If you are used to low level datastore api you must have used batch get. Continue Reading

Google App Engine: Understanding Caching

If you have been following the Google App Engine downtime notify group then you would realize that the datastore has been behaving erratically over the last 2 weeks. Though we had been thinking about exploiting Memcache for caching for a while now, but the last 2 weeks proved to be the perfect alibi. Another reason was the comment that we got on our blog by Continue Reading

Google App Engine More JPA Gotchas

We were in process of porting an application to GAE. The application used JPA for persistence and we decided to use the same for GAE as well. After deploying, the application worked fine on Google App Engine. Over a period of time we started getting errors, which seemed strange. All our tests were running fine and application worked without any issues with our seed data. Continue Reading

Duplicate Code? Chain Constructors

After the ‘Introduction of Null Object’ and the ‘Replace One/Many Distinctions with Composite’ let us do an easy one this time. It is easy but of course it is present in a lot of code samples else we would not be discussing it here. If there are a lot of constructors which have duplicate code then see if there is a reasonable possibility to chain Continue Reading

Google App Engine Some JPA Gotchas

While porting an application to Google App Engine we encountered several issues. Most of them where related to persistence. We were using JPA for persistence in the application. One of the most common mistake we did was in issuing a JPA Query where one or more parameters are of type com.google.appengine.datastore.api.Key class. Key class has two String representations which lead to some confusion. Let’s look Continue Reading

Duplicate Code? Replace One/Many Distinctions with Composite

After the first post on how to introduce Null Object, in this second post on how to write clean(er) code, let us look at one of the very frequent occurrence. At least something that I have seen quite often. You too would have noticed that many APIs provide two methods to do the same thing. One of the methods expects one object and the other Continue Reading

GAE Problems: Slim3 To The Rescue?

For the past few months we have been working on porting a time-sheet application on Google App Engine. The application we were trying to port had Spring for Dependency Injection, Hibernate for persistence and Wicket as the web framework. Looking at the will it play in app engine Hibernate was an easy call, it is not compatible on Google App Engine, wicket works with some Continue Reading

Downloading Datastore Data from a Java Application on Google App Engine

One of the most frequently talked barriers for getting onto the cloud is the data lock-in. In this post we would try to look at how we can download data as a CSV from the app engine datastore. This would help us get the data back from the app engine, just in case you want to move away from the datastore. So there exists a Continue Reading

%d bloggers like this: