Motivated by our cloud computing design principles we implement a RESTful Webservice using Jersey, a very popular Java toolkit that abstracts aways the low level details of the client-server communication. Our solution will work on any application server. In this post we use the Jetty servlet engine, which can run standalone and also is the base of the Google App Engine.
It is necessary to take a small detour, because Jersey uses its own depencency injection Library HK2. We will bridge HK2 to Guice. This will pay off soon by giving us a clear and elegant application structure.
This means that we use the following components:
Using these componente the steps are:
- create a Google App Engine project
- add Dependency Injection using Guice
- create a Rest Service with Jersey 2
Let us start with the App Engine Project in the next blog.