Great Ideas!  I have been pondering some of those issues also.
 
Mike Warne
Pihana Pacific, Inc.
 
-----Original Message-----
From: Stefan Reich [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 7:09 AM
To: JetSpeed
Cc: Jens Birger Hahn; Stefan Westerfeld
Subject: Framework extensions

Hi everybody - sorry for the long posting -:
 
We are a group of students taking part in a course focused on web application
development. We've been working on/with jetspeed for some time now, focusing
on extending the possibilities in portlet development. We have a working
implementation of our ideas.

We'd like to hear some feedback from you, regarding:
 * what do you think about our work?
 * are there other existing approaches to solve the same problems?
 * if not, is there a chance to integrate these things? how would the
   next steps for doing so look like?

Basically, the main tasks we adressed were

1. that all portlets on a page share a common namespace, which may lead to
   unwanted collisions between independent portlets

2. that portlets currently can not hold any state information

3. that there might be portlets which take a long time to compute their
   results, but the user should get a page immediately

4. two portlets on one page may work on the same set of data - when that
   happens, inconsistencies can occur when one portlet updates the data from
   user input while the other has already rendered its output

* To solve problem 1., we added a parameter called namespace into the psml file:


                        <entry type="ref" parent="NamespaceTestPortlet">
                                <parameter name="namespace" value="namespace_1"/>
                                <layout position="4"/>
                        </entry>

                        <entry type="ref" parent="NamespaceTestPortlet">
                                <parameter name="namespace" value="namespace_2"/>
                                <layout position="5"/>
                        </entry>

Our Portlet then uses a function for separating its variables into the different
namespaces (withNamespace("name") would return "namespace_1.name" in the first
portlet, and "namespace_2.name" in the second portlet).

* To solve problems 2 and 3, we introduced a new concept called Worklet. Worklets
are independent objects, which are kept in a central worklet repository. The
portlets can lookup and insert worklets into the repository. These can be used
to preserve state information and to let computations run in the background.

Also, different portlets may access the same worklet, and that way share state.

We have standardized mechanisms for expiring worklets started by users who
are no longer active. On the other hand, we have also encapsulated the usual
"isrunning", "isdone", "shouldbeterminated" and so on states used for long
running worklets (MarathonWorklets).

* For the first three problems, we have not changed the Jetspeed framework.
However to adress problem 4, we added a new function, called update, and
processing a request works in two phases now:

- call update on all Portlets (there is a dummy implementation for backward
  compatibility)
- call getContent on all Portlets

That way, we can ensure that the results of the requests are consistent when
the actual output is generated.
 
If anyone is interested, we can set up a demo page on one of the university's servers here.

Cu... Stefan, Stefan, Jens
 

Reply via email to