Architecture for Google Wave applications.

I’m designing an application for Google Wave, which interacts with the user. The following is the considerations that I have for how the architecture of the application works best.

The application that I’m planning on should consist of a Robot which interacts with the user. The other part of the application should be a web application where users can configure how the robot should interact and view status from the waves. There should also be some analytics capabilities. The backend application needs to be rather a little complex to fulfill the requirements.

The most convenient way would be to use appengine, since it is the place that is mostly integrated with Google Wave currently.

Appengine contains a lot of really nice features for building applications. You just created you application and then you don’t need to consider how to scale the application, since this is done by Google. This is a huge advantage and you don’t need to have any resources working with deployment. You can sleep at night, knowing that you cannot do anything to solve problems with the database or the servers. If you are successful and create the application with a lot of growth you just have to pay a little more. You don’t need to use Amazon EC2 or other cloud servers, where you need to scale you application programmatically via the APIs. Spikes in trafic are also handled without any problems.

I will not place my backend application on Appengine, even though I have the advantages listed above.

One problem is the “lack” of support for high performance development languages like Ruby-on-Rails (RoR) or Grails. I have tried to deploy Grails applications to Appengine. There are still some problems with getting all the features working like they do with hibernate. I also ran into problems, where the application worked on the development server, but not on the Appengine because of the whiteliste.

There is also a project for getting Jruby to work on Appengine. It mostly looks like Ruby works with Sinatra, a smaller framework than Rails. I would suspect that there is still some way to go, before the Jruby and Appengine works just as easy as the standalone version.

If it is not possible to use one of these frameworks, development will take longer time. Also the application will be less flexible be more difficult to maintain.

I want to develop the backend application in Ruby-on-Rails, since this is the place, where I have found most resources on how to create scalable applications. The plugins also is of a high quality.

All the developers in the organization are Java developers, so Groovy and Grails would be the obvious choice to learn. I just don’t find the same size of community and quality of plugins. I think we also could have success with Grails applications.

The application that, I planning to building, will have some of analytics capabilities. The Appengine datastorage does not allow summarizations of data like with SQL “select plant, sum(stock) from x group by plant“. Therefore the application should fetch all the data objects and then calculate the sum. The datastorage also have a limit on the number of entries it can return. Thought I read on the Appengine blog, that it was possible to perform queries in parallel, at least on python.

So how do I then plan to make this architecture work? Currently it is only possible to make robots, which runs on Appengine. This restriction will be removed at some point, and the robots can be created directly in the (G)rails application.

But I want to create an application which is ready, soon after wave is release of Wave to the public. So we need to get started already. To make this happen, I think the best architecture is create the deployment like the following.

I’m planning on building the robots on Appengine. The robots have access to the backend data using REST, which should be easy to create in Ruby-on-Rails. We can then use Appengine datastorage and memcache for optimizing the robot. The other alternative is to create a proxy on the Appengine, which sends the posts to our Rails applications.

I need to find a way to get the Ruby-on-Rails application hosted, but there are plenty of resources for this. An even we are optimistic, we will probably not scale to more than 10 servers.

There will also be a problem with how we can do deployment of applications, when we rollout new releases. The release need to be synchronized both to the Rails application on a robot on Appengine.

There will be an issue with finding the right place to business logic in the robots. I’m currently not sure on how this can work out.

I would like to know if you think that I’m on a wild goose chaise with my architecture. Will I have more success with developing the application on Appengine.

Bookmark and Share

Published by

avatar

Daniel Graversen

Founder of masteringwave.com and SAP Integration consultant at figaf.com

Leave a Reply

Your email address will not be published. Required fields are marked *