You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "Ate Douma (JIRA)" <je...@jakarta.apache.org> on 2005/04/01 17:59:18 UTC

[jira] Created: (JS2-226) Page Aggregation using STRATEGY_PARALLEL severly broken

Page Aggregation using STRATEGY_PARALLEL severly broken
-------------------------------------------------------

         Key: JS2-226
         URL: http://issues.apache.org/jira/browse/JS2-226
     Project: Jetspeed 2
        Type: Bug
  Components: Aggregation  
    Versions: 2.0-dev/cvs, 2.0-M2    
 Environment: Tomcat 5.0.28
    Reporter: Ate Douma
 Assigned to: Ate Douma 
    Priority: Critical


While trying to evaluate the status of JS2-17 I tested PageAggregation with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
I'll look into this AFTER the M2 release.
Not sure if the current problem is related to JS2-17 but I'll check that too.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Re: [jira] Created: (JS2-226) Page Aggregation using STRATEGY_PARALLEL severly broken

Posted by David Sean Taylor <da...@bluesunrise.com>.
David Sean Taylor wrote:
> My vote is to hold the release until this is fixed
> 
> -1 on the M2 release until multithreaded aggregation (which worked in 
> M1) is fixed
> 
Well Im retracting my -1.
Had a long talk with Ate, and we agreed to address multithreading 
properly for 2.0 next release.
Sorry everyone, just got a little upset when I saw that

+1 to continue with the release
I'll be here tomorrow working on it :)

-- 
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
[office] +01 707 773-4646
[mobile] +01 707 529 9194

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Re: [jira] Created: (JS2-226) Page Aggregation using STRATEGY_PARALLEL severly broken

Posted by Ate Douma <at...@douma.nu>.

David Sean Taylor wrote:
> Ate Douma (JIRA) wrote:
> 
>> Page Aggregation using STRATEGY_PARALLEL severly broken
>> -------------------------------------------------------
>>
>>          Key: JS2-226
>>          URL: http://issues.apache.org/jira/browse/JS2-226
>>      Project: Jetspeed 2
>>         Type: Bug
>>   Components: Aggregation      Versions: 2.0-dev/cvs, 2.0-M2    
>>  Environment: Tomcat 5.0.28
>>     Reporter: Ate Douma
>>  Assigned to: Ate Douma     Priority: Critical
>>
>>
>> While trying to evaluate the status of JS2-17 I tested PageAggregation 
>> with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total 
>> breakdown!
>> I'll look into this AFTER the M2 release.
>> Not sure if the current problem is related to JS2-17 but I'll check 
>> that too.
>>
>>
> There was a refactoring done a while back that removed the threaded 
> aggregation by default:
> 
> http://cvs.apache.org/viewcvs.cgi/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/PageAggregatorImpl.java?r1=1.18&r2=1.19&diff_format=h 
> 
> 
> I know the purpose of the refactoring was to make the improve the 
> aggregator, but not sure why it removed (and broke) multithreading
> 
> My vote is to hold the release until this is fixed
> 
> -1 on the M2 release until multithreaded aggregation (which worked in 
> M1) is fixed
I'm quite unhappy with this if it means not being able to do the M2
release this weekend... (or do you expect it to be fixed within the next
24 hours?).

Although I agree this is a serious problem and I set its priority to Critical accordingly,
I don't think it is, nor should be Blocking for the M2 release.

As it is, we have a workaround, namely using (the default configured) STRATEGY_SERIAL.
If PARALLEL rendering worked in M1 (I don't know, never tested it out) then indeed
it is a setback, but we have many, many improvements and fixes in cvs ready which I want
(and need) to have released.

There are other serious problems not resolved either which I personally would consider
even more important than this one because there are no workarounds available.
But, I have a client going to initiate several new J2 projects starting next week
and for that they really need a formal release available (especially now that I probably
won't be around anymore formally to support them).

If you really think the release should be hold up for this then could you please explain why
having it fixed first is so important. Of course, your -1 will be enough to prevent us doing
the release, but I kindly request you to reconsider this...

Regards, Ate


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Re: [jira] Created: (JS2-226) Page Aggregation using STRATEGY_PARALLEL severly broken

Posted by David Sean Taylor <da...@bluesunrise.com>.
Ate Douma (JIRA) wrote:
> Page Aggregation using STRATEGY_PARALLEL severly broken
> -------------------------------------------------------
> 
>          Key: JS2-226
>          URL: http://issues.apache.org/jira/browse/JS2-226
>      Project: Jetspeed 2
>         Type: Bug
>   Components: Aggregation  
>     Versions: 2.0-dev/cvs, 2.0-M2    
>  Environment: Tomcat 5.0.28
>     Reporter: Ate Douma
>  Assigned to: Ate Douma 
>     Priority: Critical
> 
> 
> While trying to evaluate the status of JS2-17 I tested PageAggregation with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
> I'll look into this AFTER the M2 release.
> Not sure if the current problem is related to JS2-17 but I'll check that too.
> 
> 
There was a refactoring done a while back that removed the threaded 
aggregation by default:

http://cvs.apache.org/viewcvs.cgi/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/PageAggregatorImpl.java?r1=1.18&r2=1.19&diff_format=h

I know the purpose of the refactoring was to make the improve the 
aggregator, but not sure why it removed (and broke) multithreading

My vote is to hold the release until this is fixed

-1 on the M2 release until multithreaded aggregation (which worked in 
M1) is fixed


-- 
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
[office] +01 707 773-4646
[mobile] +01 707 529 9194

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


[jira] Commented: (JS2-226) Page Aggregation using STRATEGY_PARALLEL severly broken

Posted by "JamesLiao (JIRA)" <je...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/JS2-226?page=comments#action_66704 ]
     
JamesLiao commented on JS2-226:
-------------------------------

I am interested in this bug, too. It seems that all the portlet instances share the same HttpServletRequest object underlying, which is the original one. So their attributes HashMap must be the same. That is the reason for thread competition.

I also saw that class "org.apache.jetspeed.engine.servlet.ServletRequestImpl" is trying to fix this bug by encode the attribute name to avoid conflict. 

I am wondering that why just encode the attributes which start with "org.apache.jetspeed". why don't override the removeAttribute method, too. Currently removeAttribute() operation is meanless, the default removeAttribute method can not just take the simple attribute name to remove attribute without encode it.

Does this class finish?

> Page Aggregation using STRATEGY_PARALLEL severly broken
> -------------------------------------------------------
>
>          Key: JS2-226
>          URL: http://issues.apache.org/jira/browse/JS2-226
>      Project: Jetspeed 2
>         Type: Bug
>   Components: Aggregation
>     Versions: 2.0-dev/cvs, 2.0-M2
>  Environment: Tomcat 5.0.28
>     Reporter: Ate Douma
>     Assignee: Ate Douma
>     Priority: Critical

>
> While trying to evaluate the status of JS2-17 I tested PageAggregation with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
> I'll look into this AFTER the M2 release.
> Not sure if the current problem is related to JS2-17 but I'll check that too.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Updated: (JS2-226) Page Aggregation using STRATEGY_PARALLEL severly broken

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/JS2-226?page=all ]

Woonsan Ko updated JS2-226:
---------------------------

    Attachment: more-fail-safe-diff.txt

You are right, David. Thanks.

I modified some sources, so they are testing to see if the current thread implements 'org.apache.jetspeed.aggregator.Worker' interface, not 'java.util.Map' interface.

Also, current thread context attributes are retrieved via 'org.apache.jetspeed.aggregator.CurrentWorkerContext' using 'ThreadLocal', not 'Worker' itself. So I removed Map implementation from 'WorkerImpl'.

FYI, when I added a new class named 'CurrentWorkerContext', I refered to 'org.apache.jetspeed.i18n.CurrentLocale' class in 'jetspeed-api'.

I did some basic tests and it worked as it did.

> Page Aggregation using STRATEGY_PARALLEL severly broken
> -------------------------------------------------------
>
>                 Key: JS2-226
>                 URL: http://issues.apache.org/jira/browse/JS2-226
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Aggregation
>    Affects Versions: 2.1
>         Environment: Tomcat 5.0.28
>            Reporter: Ate Douma
>         Assigned To: David Sean Taylor
>            Priority: Critical
>         Attachments: JS2-226-diff.txt, more-fail-safe-diff.txt
>
>
> While trying to evaluate the status of JS2-17 I tested PageAggregation with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
> I'll look into this AFTER the M2 release.
> Not sure if the current problem is related to JS2-17 but I'll check that too.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Commented: (JS2-226) Page Aggregation using STRATEGY_PARALLEL severly broken

Posted by "Ate Douma (JIRA)" <je...@portals.apache.org>.
    [ http://issues.apache.org/jira/browse/JS2-226?page=comments#action_12355975 ] 

Ate Douma commented on JS2-226:
-------------------------------

I'm going to reassign this issue to David Sean Taylor as he might be able to indicate if his current enhancements can resolve this somehow.
I leave it to him to decide if this can be resolved (if at all) for 2.0-FINAL. 

> Page Aggregation using STRATEGY_PARALLEL severly broken
> -------------------------------------------------------
>
>          Key: JS2-226
>          URL: http://issues.apache.org/jira/browse/JS2-226
>      Project: Jetspeed 2
>         Type: Bug
>   Components: Aggregation
>     Versions: 2.0-dev/cvs, 2.0-M2
>  Environment: Tomcat 5.0.28
>     Reporter: Ate Douma
>     Assignee: Ate Douma
>     Priority: Critical

>
> While trying to evaluate the status of JS2-17 I tested PageAggregation with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
> I'll look into this AFTER the M2 release.
> Not sure if the current problem is related to JS2-17 but I'll check that too.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Commented: (JS2-226) Page Aggregation using STRATEGY_PARALLEL severly broken

Posted by "David Sean Taylor (JIRA)" <je...@portals.apache.org>.
    [ http://issues.apache.org/jira/browse/JS2-226?page=comments#action_12431942 ] 
            
David Sean Taylor commented on JS2-226:
---------------------------------------

> On the other hand, I think my idea has some problems like the following:
>  - If some portlets are parallel and otheres are not, then the current threads are not worker thread only. If a current thread is one of the servlet 
>    container, then we cannot store attributes in that. I need to have a solution for this. 

We will need to start off a single thread that executes all sequential tasks

> Which is proper, PageAggregatorImpl with parallel option or AsyncPageAggregatorImpl? 

i've been working on the AsyncPageAggregatorImpl, just to keep things separated during prototypes




> Page Aggregation using STRATEGY_PARALLEL severly broken
> -------------------------------------------------------
>
>                 Key: JS2-226
>                 URL: http://issues.apache.org/jira/browse/JS2-226
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Aggregation
>    Affects Versions: 2.1
>         Environment: Tomcat 5.0.28
>            Reporter: Ate Douma
>         Assigned To: David Sean Taylor
>            Priority: Critical
>
> While trying to evaluate the status of JS2-17 I tested PageAggregation with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
> I'll look into this AFTER the M2 release.
> Not sure if the current problem is related to JS2-17 but I'll check that too.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Commented: (JS2-226) Page Aggregation using STRATEGY_PARALLEL severly broken

Posted by "Ate Douma (JIRA)" <je...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/JS2-226?page=comments#action_66716 ]
     
Ate Douma commented on JS2-226:
-------------------------------

The problem is bigger (and deeper) than just the sharing of the same HttpServletRequest.
If that was the case I would have been able to fix this long time ago as I already have done so in my test environment.

But, the real problem is the Tomcat engine: its not build for thread save processing of a request.
At the core of a HttpServletRequest is a Tomcat CoyoteRequest. You can't fake, wrap, or foul that one.

Right now, I'm quite pessimistic about getting this issue fixed (for Tomcat at least).

> Page Aggregation using STRATEGY_PARALLEL severly broken
> -------------------------------------------------------
>
>          Key: JS2-226
>          URL: http://issues.apache.org/jira/browse/JS2-226
>      Project: Jetspeed 2
>         Type: Bug
>   Components: Aggregation
>     Versions: 2.0-dev/cvs, 2.0-M2
>  Environment: Tomcat 5.0.28
>     Reporter: Ate Douma
>     Assignee: Ate Douma
>     Priority: Critical

>
> While trying to evaluate the status of JS2-17 I tested PageAggregation with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
> I'll look into this AFTER the M2 release.
> Not sure if the current problem is related to JS2-17 but I'll check that too.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Resolved: (JS2-226) Page Aggregation using STRATEGY_PARALLEL severly broken

Posted by "David Sean Taylor (JIRA)" <je...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/JS2-226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Sean Taylor resolved JS2-226.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1

the base development is completed for version 2.1


> Page Aggregation using STRATEGY_PARALLEL severly broken
> -------------------------------------------------------
>
>                 Key: JS2-226
>                 URL: https://issues.apache.org/jira/browse/JS2-226
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Aggregation
>    Affects Versions: 2.1
>         Environment: Tomcat 5.0.28
>            Reporter: Ate Douma
>         Assigned To: David Sean Taylor
>            Priority: Critical
>             Fix For: 2.1
>
>         Attachments: JS2-226-diff.txt, more-fail-safe-diff.txt
>
>
> While trying to evaluate the status of JS2-17 I tested PageAggregation with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
> I'll look into this AFTER the M2 release.
> Not sure if the current problem is related to JS2-17 but I'll check that too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Updated: (JS2-226) Page Aggregation using STRATEGY_PARALLEL severly broken

Posted by "David Sean Taylor (JIRA)" <je...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/JS2-226?page=all ]

David Sean Taylor updated JS2-226:
----------------------------------

    Description: 
While trying to evaluate the status of JS2-17 I tested PageAggregation with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
I'll look into this AFTER the M2 release.
Not sure if the current problem is related to JS2-17 but I'll check that too.


  was:
While trying to evaluate the status of JS2-17 I tested PageAggregation with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
I'll look into this AFTER the M2 release.
Not sure if the current problem is related to JS2-17 but I'll check that too.


        Version: 2.0-POST
                     (was: 2.0-dev/cvs)
                     (was: 2.0-M2)

Going to set this to post 2.0
Ive had some luck with Velocity-only portlets. JSP was crashing on me right and left.
Will be revisiting this post 2.0 along with caching (finally)

> Page Aggregation using STRATEGY_PARALLEL severly broken
> -------------------------------------------------------
>
>          Key: JS2-226
>          URL: http://issues.apache.org/jira/browse/JS2-226
>      Project: Jetspeed 2
>         Type: Bug
>   Components: Aggregation
>     Versions: 2.0-POST
>  Environment: Tomcat 5.0.28
>     Reporter: Ate Douma
>     Assignee: David Sean Taylor
>     Priority: Critical

>
> While trying to evaluate the status of JS2-17 I tested PageAggregation with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
> I'll look into this AFTER the M2 release.
> Not sure if the current problem is related to JS2-17 but I'll check that too.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Commented: (JS2-226) Page Aggregation using STRATEGY_PARALLEL severly broken

Posted by "David Sean Taylor (JIRA)" <je...@portals.apache.org>.
    [ http://issues.apache.org/jira/browse/JS2-226?page=comments#action_12431771 ] 
            
David Sean Taylor commented on JS2-226:
---------------------------------------

Hi Woonsan,

I was planning on working on the parallel strategy in September for the 2.1 release. My schedule has slipped a little though, so Im encouraged to hear someone else show interest in the parallel strategy.

I wouldn't be put off by the performance.
There are some very valuable use cases that make the parallel strategy valuable. If all of your portlets are simply retrieving small snippets of content, and displaying them, there will be no advantage. In fact, the overhead will make the overall aggregation slower. I would think that we would want to make use of hints to help with the parallel aggregation process, such as statistical analysis and configuration. With configuration, a portlet can be marked as requiring parallel. With statistics, we can keep track of which portlets are slow, and move those into thread groups based on their historical performance.

The key use case for parallel rendering is when one or more portlets are taking a lot longer than other portlets to render, then the other portlets will not have to wait on them as they do in the sequential strategy. Additionally, we can put a ms threshold on all portlet threads returning, so that if a portlet takes more than say 4000 ms, we override  the content with "Portlet Not Available" and return the entire response stream. The thread will have to be collected later. 

I think your idea, of storing attributes in the worker, is sound.
In my testing, I also discovered that Tomcat requests are not thread-safe.

We are actually solving this problem from two different approaches in 2.1. Parallel rendering on the server is on approach. The second approach is parallel rendering on the client, with the Jetspeed Desktop.
The Desktop solution distributes the aggregation process onto clients. 

Anyway, I'd be very happy to work with you on this.
 


> Page Aggregation using STRATEGY_PARALLEL severly broken
> -------------------------------------------------------
>
>                 Key: JS2-226
>                 URL: http://issues.apache.org/jira/browse/JS2-226
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Aggregation
>    Affects Versions: 2.1
>         Environment: Tomcat 5.0.28
>            Reporter: Ate Douma
>         Assigned To: David Sean Taylor
>            Priority: Critical
>
> While trying to evaluate the status of JS2-17 I tested PageAggregation with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
> I'll look into this AFTER the M2 release.
> Not sure if the current problem is related to JS2-17 but I'll check that too.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Commented: (JS2-226) Page Aggregation using STRATEGY_PARALLEL severly broken

Posted by "David Sean Taylor (JIRA)" <je...@portals.apache.org>.
    [ http://issues.apache.org/jira/browse/JS2-226?page=comments#action_12456219 ] 
            
David Sean Taylor commented on JS2-226:
---------------------------------------

Patch applied and tested, thanks Woonsan.
I will send you a list of remaining tasks and possible schedule for implementing these tasks between us
Note:
We test for one of our worker threads by testing to see if the current thread implements the Map interface
Im just wondering if this will lead to problems, say if some app server decides to also implement the Map interface on their thread. We might want to have a more fail-safe method of testing for the current thread being one of our boys

> Page Aggregation using STRATEGY_PARALLEL severly broken
> -------------------------------------------------------
>
>                 Key: JS2-226
>                 URL: http://issues.apache.org/jira/browse/JS2-226
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Aggregation
>    Affects Versions: 2.1
>         Environment: Tomcat 5.0.28
>            Reporter: Ate Douma
>         Assigned To: David Sean Taylor
>            Priority: Critical
>         Attachments: JS2-226-diff.txt
>
>
> While trying to evaluate the status of JS2-17 I tested PageAggregation with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
> I'll look into this AFTER the M2 release.
> Not sure if the current problem is related to JS2-17 but I'll check that too.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Updated: (JS2-226) Page Aggregation using STRATEGY_PARALLEL severly broken

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/JS2-226?page=all ]

Woonsan Ko updated JS2-226:
---------------------------

    Attachment: JS2-226-diff.txt

Hi David,

My test patches are posted, which make parallel rendering just work.
My patches do not contain timeout, defered rendering, etc.
Here is explanation for my patches.

[Basic idea]
    * Because the request is not thread-safe, in parallel mode, our request wrapper needs to store attributes in the worker thread. The worker thread can implement java.util.Map interface to allow manipulating attributes.
    * Other thread-unsafe codes can look up attributes from the current worker in parallel mode.

[Changes by me]
    * jetspeed-api/.../PortalReservedParameters.java
        - A constant for portlet definition attribute added.
    * jetspeed-api/.../PortletRenderer.java
        - The render method now returns RenderingJob instance, which will be used for portlets rendering synchronization.
    * jetspeed-api/.../RenderingJob.java
        - PortletContent getPortletContent() is added. In portlets rendering synchronization in AsyncPageAggregatorImpl, portlet content needs to be waited until completion.
    * components/portal/.../AsyncPageAggregatorImpl.java
        - I rewrote portlets rendering synchronization.
    * components/portal/.../PortletRendererImpl.java
        - In parallel mode, it stores attributes into rendering job object, and the rendering job will pass the attributes to worker when it runs.
    * components/portal/.../WorkerImpl.java
        - It contains attributes map and implements java.util.Map to store and allow to manipulate attributes.
    * components/portal/.../RenderingJobImpl.java
        - It passes attributes to the current running worker
        - And it stores portlet definition attribute to reset wrong portlet entities.
    * components/portal/.../ServletPortletInvoker.java
        - This class was not thread-safe. It has a member variable for portlet definition.
        - So, in parallel mode, portlet definition is looked up from worker now.
        - Also it stores other attributes into worker in parallel mode.
    * components/portal/.../ServletRequestImpl.java
        - This wrapper class can look up and store attributes from worker or from servlet request.
    * commons/.../JetspeedContainerServlet.java
        - This servlet was not thread-safe because it looked up portlet information from the servlet request.
        - So, this servlet can look up those from worker now.
    * components/portal/.../JetspeedRequestContextComponent.java
        - This component looked up principal from RequestContextComponent, which looked up RequestContext from ThreadLocal member. However, in parallel mode, the ThreadLocal member is null. So, in parallel mode, it looks up that from current running worker.

[Problems remained]
    * Sometimes, some portlet cannot render when page is visited for the first time after tomcat starts up. After that, this problem does not occur any more. You can find the error message in the tomcat log file. (NoClassDefFoundError...)
    * The portlets in JSF Demo page do not work properly. Sometimes one of portlets cannot render with exception. Probably, some attributes are needed for JSF portlets.
    * In parallel mode, portlet definition of portlet entity is replaced with wrong object, but I could not find the reason. So ServletPortletInvoker checks if the portlet definition is wrong and resets.

Thanks for reading.
Any comment welcomed.

> Page Aggregation using STRATEGY_PARALLEL severly broken
> -------------------------------------------------------
>
>                 Key: JS2-226
>                 URL: http://issues.apache.org/jira/browse/JS2-226
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Aggregation
>    Affects Versions: 2.1
>         Environment: Tomcat 5.0.28
>            Reporter: Ate Douma
>         Assigned To: David Sean Taylor
>            Priority: Critical
>         Attachments: JS2-226-diff.txt
>
>
> While trying to evaluate the status of JS2-17 I tested PageAggregation with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
> I'll look into this AFTER the M2 release.
> Not sure if the current problem is related to JS2-17 but I'll check that too.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Commented: (JS2-226) Page Aggregation using STRATEGY_PARALLEL severly broken

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
    [ http://issues.apache.org/jira/browse/JS2-226?page=comments#action_12431780 ] 
            
Woonsan Ko commented on JS2-226:
--------------------------------

David,

Thanks for your comment. I'm very happy with your insights. 
Very important clues from you:
 - Defered rendering for late-rendering portlets is possible. (Worker can store the late content for later use.)
 - Portlets can be marked as parallel processing.
 - Jetspeed Desktop can be a good alternative.

On the other hand, I think my idea has some problems like the following:
 - If some portlets are parallel and otheres are not, then the current threads are not worker thread only. If a current thread is one of the servlet container, then we cannot store attributes in that. I need to have a solution for this.

Also I think:
 - Defered rendering has no problem. I think the aggregator can do that according to portlet definitions.
 - I think Jetspeed Desktop is one of the best solutions for PC-based browser clients. However, the server-side solution is meaningful, as David said.

By the way, I have a question. There are two classes, PageAggregatorImpl and AsyncPageAggregatorImpl. Which is proper, PageAggregatorImpl with parallel option or AsyncPageAggregatorImpl?
I guess PageAggregatorImpl is more adequate because it has to support portlets marked as parallel. Am I right?

I will post my test patches when I finish cleaning my messy codes. (about until September 8.)
Thanks again, David.

> Page Aggregation using STRATEGY_PARALLEL severly broken
> -------------------------------------------------------
>
>                 Key: JS2-226
>                 URL: http://issues.apache.org/jira/browse/JS2-226
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Aggregation
>    Affects Versions: 2.1
>         Environment: Tomcat 5.0.28
>            Reporter: Ate Douma
>         Assigned To: David Sean Taylor
>            Priority: Critical
>
> While trying to evaluate the status of JS2-17 I tested PageAggregation with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
> I'll look into this AFTER the M2 release.
> Not sure if the current problem is related to JS2-17 but I'll check that too.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Assigned: (JS2-226) Page Aggregation using STRATEGY_PARALLEL severly broken

Posted by "Ate Douma (JIRA)" <je...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/JS2-226?page=all ]

Ate Douma reassigned JS2-226:
-----------------------------

    Assign To: David Sean Taylor  (was: Ate Douma)

> Page Aggregation using STRATEGY_PARALLEL severly broken
> -------------------------------------------------------
>
>          Key: JS2-226
>          URL: http://issues.apache.org/jira/browse/JS2-226
>      Project: Jetspeed 2
>         Type: Bug
>   Components: Aggregation
>     Versions: 2.0-dev/cvs, 2.0-M2
>  Environment: Tomcat 5.0.28
>     Reporter: Ate Douma
>     Assignee: David Sean Taylor
>     Priority: Critical

>
> While trying to evaluate the status of JS2-17 I tested PageAggregation with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
> I'll look into this AFTER the M2 release.
> Not sure if the current problem is related to JS2-17 but I'll check that too.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Commented: (JS2-226) Page Aggregation using STRATEGY_PARALLEL severly broken

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
    [ http://issues.apache.org/jira/browse/JS2-226?page=comments#action_12431770 ] 
            
Woonsan Ko commented on JS2-226:
--------------------------------

I've investigated this issue for last two months to provide parallel processing feature for my client.

During my work, I found the following: (I feel that this issue is so big and deep, as Ate said.)

  - The request of tomcat is not thread-safe, but anyway the last wrapper is org.apache.jetspeed.engine.servlet.ServletRequestImpl for portlets. (So the implementation can reference other sources, such as current thread.)
  - Portlet-level attributes are encoded in JS2, but upper-level ones are not. e.g) portlet instance, portlet config, portlet request, portlet response, method id, portlet name and context.
  - On the other hand, in parallel processing, there is a thread pool. (WorkerMonitor and Worker)
  - Therefore, I thought that some upper-level attributes (such as "javax.portlet.request") could be stored in the worker thread, not just in request, and then in parallel processing the attributes could be referenced via the worker thread, not just via request. (Actually, I implemented the java.util.Map interface in my test worker class.)

I've been experimented the idea by writing some messy codes which extended or overrode the existing components, and it seems like working well now in point of functionality
However, the performance is not as good as I expected in my test environment. (One CPU PC.)

I'm not sure the parallel processing is better in point of performance (Response time).

Anyway, I want to know how you think of my idea. (Some attributes can be stored and referenced in the worker thread for the parallel rendering portlets.) Any comment welcomed.

> Page Aggregation using STRATEGY_PARALLEL severly broken
> -------------------------------------------------------
>
>                 Key: JS2-226
>                 URL: http://issues.apache.org/jira/browse/JS2-226
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Aggregation
>    Affects Versions: 2.1
>         Environment: Tomcat 5.0.28
>            Reporter: Ate Douma
>         Assigned To: David Sean Taylor
>            Priority: Critical
>
> While trying to evaluate the status of JS2-17 I tested PageAggregation with PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
> I'll look into this AFTER the M2 release.
> Not sure if the current problem is related to JS2-17 but I'll check that too.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org