Google Summer of Code proposal: Suplement Servlet Service Framework implementation


The Servlet Service Framework (SSF) – subproject of Apache Cocoon – is one of latest inventions coming from Cocoon community. The main idea behind SSF is to enable use of casual servlets in component-oriented architectures. SSF aims to fully utilize standard Servlet API and HTTP specification instead of hiding them behind abstractions that are, in a fact, duplicating existing ones. Servlet Service Framework supports RESTful methodology of building web applications very naturally. The succes of the idea and implementation can be easily measured by observing activity on both development and user's mailing lists of the Apache Cocoon project – SSF has become the hottest topic now.

Even though SSF is already usuable piece of software it still has a lot of improvement. The goal of my project would be to identify lacking features and incomplete implementation of existing and give it more polish, including following items:

Project Description

Addressing FIXME/TODO marks

Servlet Service Framework internally acts like a light-weight Servlet container but uses Spring for managing servlets that theirselves are casual Spring beans. As a consequence of this fact SSF provides its own implementation of Servlet API interfaces like Request, Response, ServletContext. These interfaces are rich in functionality they provide but for the first implementation not all methods were implemented excluding those less often used. Methods lacking implementation has been marked with TODO string.
Apart from that, some portions of code has been quickly prototyped and needs more polishing thus marked with FIXME mark. My goal is to revise all of them (about twenty) and address the ones identified as the most important.

Implementation of SAX buffering for servlet service requests

Servlet Service Framework allows to establish connections between servlets enabling them to make HTTP requests to each other. There is special notion of HTTP requests that has additional support from SSF – they are called servlet service requests. General definition of servlet service is a HTTP resources identified by URL that handles POST requests coming with data included in reqest's body and returns a response with processed data included in response's body. It's very common, especially when SSF is used for managment of Cocoon servlets, that data processed by service is an XML document. In such situation, it's much more efficient to avoid serialization and parsing (marshalling and unmarshalling) of XML content and pass a SAX events directly. My goal would be to extend SSF implementation in order to support SAX buffer passing and adapt some of existing Cocoon components so they can take advantage of more efficient implementation.

Fixing already identified issues

There are some open issues in Cocoon's issue tracker related to Servlet Service Framework. My work is to identify exact problem and provide fix for thems. This should be the easiest part of my GSoC project.

Samples and tutorials

That's very important aspect of this project. Servlet Service Framework brings some new ideas and new thinking about servlets to web development world so it's not surprising that there are some difficulties with adoption of it. Certainly, good samples and tutorials should speed up user-base growth and community support. Even a quick observation of SSF-related discussions on user's mailing list reveals a strong need for samples presenting best-practices and ways of integration with Spring framework and exploiting its potential for SSF needs. My goal would be to convert collected usage patterns into working samples. The most requested (or difficult) aspects of SSF should be covered by tutorials as well.



26.05 - 20.06

discussion about implementation details, review of existing bug reports and find out if any additional information need to be provided by bug reporters.

20.06 - 27.06

addressing FIXME/TODO marks in code

27.06 - 07.07

implement SAX buffering servlet service requests; write first summury of work progress

07.07 - 17.07

fix issues mentioned earlier; start discussing with users and developers what kind of samples would be mostly needed

17.07 - 06.08

create several rich samples presenting SSF functionality in action; provide second summury of work progress

06.08 - 16.08

basing on user's and my own experience write tutorials explaining the most difficult (and important) aspects of SSF

Note: I need to start doing real work later because of exams at my university in the mid of June

Community involvement

My goal is not only provide a feature-rich implementation of SSF but also promote Servlet Service Framework project amongst Cocoon community members. Therefore, I'll try to keep everyone informed with the progress of my work and its results. I'm planning to prepare appealing small sample application exploiting implemented features right from the beginning so early adopters can test it and provide feedback. While working on bigger samples applications I'll do some research on users' problems ecountered while using SSF and try to address my findings in prepared sample applications.

About me

Grzegorz Kossakowski,
I'm second-year Mathematics student at Faculty of Mathematics, Informatics and Mechanics, Warsaw University. I've been around Apache Cocoon for six years and was elected as Cocoon committer one year ago. I've participated in GSoC programme last year with very satisfying results best summyrized by my mentor – Daniel Fagerstrom. See this e-mail for details of the summury.
After almost a year since my first participation in GSoC I can say for sure that my both programming and Open Source skills improved so I'm confident that my participation in GSoC would be even more succesfull this year.