----- Student project idea: Cocoon Profiling ----- ----- 2009 - 2011 ----- Student project idea: Cocoon Profiling Collect profiling data on a per-request basis and expose it via a RESTful web service * Description A Cocoon request goes through many components While performing a Cocoon request, servlets, sitemaps and pipeline components are being executed. It is also quite common that Cocoon requests are cascaded which makes it sometimes difficult to understand what exactly was happening. The goal of this project is to collect data on a per-request basis about the involved * servlets * sitemaps and their nodes * pipeline components (input parameters, configuration, the content before and after their invocation, execution times) [] and expose this data via RESTful web services: ---- GET /cocoon-profiling/request/1 ........................................................ GET /cocoon-profiling/request/1/data/1 ........................................................

Video 1

---- Additionally an XHTML representation of the profiling data should be provided so that the data becomes more readable. * Implementation ideas It is important that the profiling module doesn't affect any existing code. That can be achieved by using aspect-oriented programming. Cocoon 3 web applications make use of following modules: * cocoon-pipeline * cocoon-sitemap * cocoon-servlet * cocoon-controller * cocoon-rest [] and builds upon the * cocoon-servlet-service framework [] Except the stand-alone cocoon-pipeline module all other modules make use of Spring. Since Spring comes with great AOP support, it's our idea to collect all the necessary information about servlets, invoked sitemaps and their nodes and pipeline components by using Spring AOP. The collected data can be stored by using ThreadLocals and kept in memory. When profiling is turned on, the header parameter <<>> is added to the response header and contains the link to the profiling data webservice, e.g. <<<../../cocoon-profiling/request/1>>>. Again, this can be achieved by AOP interception mechanisms applied on servlets. The RESTful webservices can be implemented by using the cocoon-rest module. Profiling can be turned on and off by using JMX or by configuration parameters. * Deliverables * cocoon-profiling module integrated into the Cocoon 3 build process * usage documentation * Javadocs * Technologies Cocoon 3, Spring AOP, Java, RESTful webservices * Related ideas There is an additional {{{./cocoon3-profiling-ui.html} project idea (Cocoon 3 Profiling UI)}} of creating a Firebug plugin that shows the data of the request in a user-friendly way.