Hi,

Here is a summary of the progress I've done on this project as most of
the communication was going on through IRC chat or IM due to the
increased efficiency of exchanging ideas.

You can find the async-servlet-sca sample in the contrib area. It simulates
the features that will be available after the completion of the project,
this meaning HTTP streaming. To run it, you need Tomcat 7 or Glassfish which
support Servlet 3. This composite consists of 3 components:

   1. the browser client (javascript)
   2. the servlet
   3. a java component

During the research I've done, I ran into some limitations:

   - The Servlet 3.0 API offers asynchronous communication by delaying the
   commit of the response, multiple responses can be sent by flushing the
   response. Tried achieving real time updating in the browser with jquery and
   dojo on the javascript side but they are waiting for the response commit
   before interpreting the response. This can make 'one request - one response'
   async communication easy to achieve, but this is already available in
   Tuscany with impl.widget or dwr. In order to bring something new to Tuscany,
   I continued my research and the only way of identifying and executing
   multiple uncommitted responses for one request would be script injection
   (returning the response as script tags into html). This is actually the
   mechanism behind JSONP but again I can't use any existing JSONP library (due
   to the response commit phase). However, script injection seems to me like a
   good option and I'm up to implementing JSONP (or something similar) through
   uncommitted responses (one script tag for each flushed response)
   - There have been multiple discussions going on for how to model the
   scdl. First of all, we needed to establish if the servlet will be
   transparent in the composite definition. This is limited for now as impl.web
   currently doesn't expose services and callbacks would be needed for 'one
   request - multiple responses' communication. Due to the fact that I don't
   posses so much experience in developing extensions for Tuscany and I can't
   estimate how big are the changes needed in impl.web to support callbacks,
   we've decided that I can model the browser <-> servlet async communication
   in an sca way in the gsoc timeframe (about one month left). Meanwhile, if
   somebody is available to make the necessary changes to impl.web I might be
   able to make the servlet to be transparent in the configuration in the gsoc
   timeframe. If not, I will continue after gsoc in developing this too. I find
   both types of communication useful: browser - servlet (for low level
   communication), browser - component through a transparent servlet (for any
   kind of communication).

At the beginning of this week, I'll settle down with Ant a final version for
the scdl in the browser-servlet communication (this covers the gsoc project)
and I'll post a sample on this thread on how it will look like.
Meanwhile, I'm available for comments, questions or clarifications (sorry
for the long post).

Thanks,

Florian

Reply via email to