You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-user@portals.apache.org by Masumi Ito <ma...@mb.infosnow.ne.jp> on 2003/12/02 19:52:01 UTC

About WSRP4J Consumer

Hello.

I roughly read WSRP Specification and Java Portlet Specification.
I have understood that the role of Portal server and Portlet 
container in JSR 168 are equivarent to that of Consumer and 
Producer in WSRP.
But, Investigating this mailing lists and WSRP4J's Home Pages,
I saw the statement that Consumer are pluged in Portlet 
container as a generic proxy portlet to 
consume remote services that are provided by remote Producer.
Isn't Consumer a portal which aggregates the contents and 
presents them to the End-User?
Or the concept that Consumer acts as a proxy portlet is WSRP4J 
original?
Otherwise, Consumer has the both functionarity?

And if using a proxy portlet of Consumer,I think there is 
the following problem.

assume the following scenario:
* We want to get the markup contents from portlet A and B.      
* Producer A which is in local environment contains portlet A.   
* Producer B which is in remote environment contains portlet B.  
* Producer A has Consumer as a proxy portlet, and We access to 
portlet B on Producer B via Consumer.
* Consumer use UDDI to find Producer which has the targeted 
portlet.

In this case, UDDI must be described that Producer A has both 
portlet A and B. 
Because portal(Consumer) can't forward the PortletRequest for 
Portlet B from End-User to Producer A if portal can't find the 
statement that Producer A has portlet B in UDDI.
But if there is such a statement in UDDI, the proxy 
portlet(Consumer) received the request may find not Producer B 
but Producer A as Producer which has the entity of portlet B.
Thereby We may go into an infinite loop!


Thank you.

Masumi


Re: About WSRP4J Consumer

Posted by Masumi Ito <ma...@mb.infosnow.ne.jp>.
Hi Richard,

Thanks so much for answering my questions. 
That means a lot to me!
I have got a big picture view of WSRP.

Richard Jacob <ja...@apache.org> wrote:

> >First, UDDI should be registerd in the follwing state:
> >  -	portal A hosts portlet A and portlet B
> >
> why? Should consmer of portlet B directly access portal B? instead of 
> going through A?
> But in general this would be possible, of course.
> 

The sentence of "portal A hosts portlet A and portlet B" means 
consumer of portlet B can indirectly go throught A to get markup 
of portlet B. Because portal B hosts original B.
So consumer of portlet B is allowed both to directly access 
portal B and to indirectly access portal A.

I think there are at least two cases as the scenario in which a 
proxy portlet is required.
 1. For the sake of the measures to security, comsumer is forbidden
    to directly access portal B, and compelled to go        
    through portal A on instead if it wants to get any portlets
    which portal B hosts

 2. Consumer can directly access portal B, but there are long 
    distance between them, e.g. consumer in Japan and portal B
    in America. 

    Or the case that portal B has a lot of traffic loads by     
    being accessed all at once and wants to distibute loading    
    is also applicable.

    Then consumer use portal A in Japan as a proxy of portal B 
    to get any portlets portal B hosts. A has caches of any 
    portlets portal B hosts, but it doesn't mean A is installed 
    them. When the request for portlets like B' from Consumer 
    reaches A, A checks the availableness for caches it has. If 
    they are latest cashes, A provides them for B. If not latest, 
    A reacquires newest caches from B. 
    But I don't know how this caching mechanism should be implemented.

Consequently, I think a proxy mechanism can be required 
depending on the situation.


> >  -	portal B hosts portlet B
> >
> >When consumer C searches UDDI for the producer which hosts 
> >portlet B in this situation, it hits producer A and B.
> >The decision of A or B is entrusted to End-User.
> >If B is selected, consumer directly binds B without using proxy 
> >mechanism.
> >If A is selected, consumer sends request for B to B'. And then 
> >B' also searches UDDI for producer which hosts B on the purpose 
> >of finding the entity of B.
> >
> Why does it search? It knows already who hosts the original B.

Yes. It's true that B'(proxy portlet) already knows the URL of 
the web service end-point for portal B which hosts original B at 
the point of publishing portlet B(or B') into UDDI by portal A. 

But I thought the following:

portal B could be change the end-point URL by a certain reason 
after a while. And then, portal B would republish the end-point 
URL of itself into UDDI. Meanwhile, B' wouldn't 
notice the fact that the end-point URL is reentried.
So, B' should dynamically find portal B to deal flexibly with 
this case, insted of relying on the old infomation about the 
end-point URL.


However, there may be no problem if we develop such a mechanism 
that portal B provide notification of a change of the end-point 
URL for all the potals which host a proxy portlet like B'.

> >At this moment, the choice of A or B automatically must be 
> >decided unlike in the case of the previous decision.
> >Now then, if A is continuously selected a number of times, 
> >consumer can't get the entitiy of B all along.
> >This means that a proxy portlet refers to a potal which manages 
> >to it, i.e., self-reference.
> >
> Correct a possible scenario, we can't prevent loops in references within 
> registries.
> It's up to the admins to hanlde this correctly.
> What would be your suggestion to prevent such loops?
> 

For example, 
 - portal A and B are on corporate intranet.
 - consumer C is over Internet.
It would be simple in this situation.

We register only portal A into public UDDI consumer C can reffer 
to, and register only portal B into private UDDI on corporate 
intranet. Of cource, C can't reffer to private UDDI.
So, C find portal A which C assumes hosts portlet B in public 
UDDI, and send the request to portal A. 
B'(a proxy portlet) receiving it can find portal B hosting 
original B in private UDDI without any difficulty.

But there'll be more complexed situation like registration 
of many kinds of portals into the same UDDI.
I'm thinking of how to handle this case.
As soon as my ideas take shape, I'll suggest it.
Whom should I contact then?
Could I contact you?

------------------------------------------------------------
Masumi Ito <ma...@complex.eng.hokudai.ac.jp>
------------------------------------------------------------

Re: About WSRP4J Consumer

Posted by Richard Jacob <ja...@apache.org>.
Hi,

Masumi Ito wrote:

>I understand that SwingConsumer is a portal conuming wsrp services.
>but I don't know the reason that a proxy portlet is required 
>when WSRP Consumer consumes service.
>The communication between WSRP Consumer and WSRP Producer uses 
>the Stub generated from WSDL by Axis' capability.
>A proxy portlet differs from this stub, doesn't it?
>
The proxy portlet would be a JSR168 portlet. It would be invoked by a 
JSR168 container/portal and then translate the local calls to WSRP calls.
Thus I called it proxy portlet here.
The usage of WSRP would be completly transparent to the JSR168 
container. It would simply onvoke a local portlet but this portlet would 
proxy
the request to a remote WSRP service.

>
>Or do I have the wrong idea about the meaning the term "portal" 
>indicates?
>In my perception, a portal has only the functionality of 
>aggregation as a portal server and delegates the management of 
>portlets' life cycle to portlet containers which are components 
>separated from a portal.
>
Correct, and of course a portal does some other things like user 
management, personalization, etc.

>But I wonder a portal contains not only aggregating application 
>but also portlet containers which deal with local portlets and a
>proxy portlet.In other words, WSRP Consumer as well as WSRP 
>Producer has portlet containers?
>
WSRP doesn't talk about containers at all.
This could be one possible implementation choice.
The wsrp4j producer uses the JSR168 container and exposes JSR168 
portlets as WSRP services.
On the other side a JSR168 container/portal could integrate WSRP 
webservices by using the mentioned wsrp proxy portlet.

>
>In JSR168, a portal and a portlet container can be built 
>together as a single component of an application suite or as two 
>separate components of a portal application.
>
>Which concept does a portal called "WSRP Consumer" correspond to?
>
As said above: none of these.
Typcially a portal can be a WSRP consumer but WSRP is not limited to 
portals.
Every application could consume wsrp services.

>
>If the former(a single component) is right , WSRP Consumer may 
>be able to manage to portlets; direct access to local portlets 
>and indirect access to remote portlets via a proxy portlet. And 
>WSRP Consumer may be ought to use a proxy portlet when WSRP 
>Consumer accesses to WSRP Producer via WSRP protocol.
>
>  
>
Correct, but agains it's only one implementation choice...
Same would apply if aggregation and container were seperate components.

>Sorry for my confusing explanations.
>The scenario you provide for me is simple and understandable.
>Please let me use your scenario to explain my thinking.
>
>  
>
>>Assume the following scenario:
>>- Portal A hosts portlet A
>>- Portal B hosts portlet B
>>In that case both portals would advertise their portlets to UDDI.
>>    
>>
>First, UDDI should be registerd in the follwing state:
>  -	portal A hosts portlet A and portlet B
>
why? Should consmer of portlet B directly access portal B? instead of 
going through A?
But in general this would be possible, of course.

>  -	portal B hosts portlet B
>
>The reason:
>If consumer C find thd description that portal A hosts B' in 
>UDDI, it can't judge that B' is equal to B except for name. So 
>consumer may consider B' differes from B.
>
>When consumer C searches UDDI for the producer which hosts 
>portlet B in this situation, it hits producer A and B.
>The decision of A or B is entrusted to End-User.
>If B is selected, consumer directly binds B without using proxy 
>mechanism.
>If A is selected, consumer sends request for B to B'.And then 
>B' also searches UDDI for producer which hosts B on the purpose 
>of finding the entity of B.
>
Why does it search? It knows already who hosts the original B.

>At this moment, the choice of A or B automatically must be 
>decided unlike in the case of the previous decision.
>Now then, if A is continuously selected a number of times, 
>consumer can't get the entitiy of B all along.
>This means that a proxy portlet refers to a potal which manages 
>to it, i.e., self-reference.
>
Correct a possible scenario, we can't prevent loops in references within 
registries.
It's up to the admins to hanlde this correctly.
What would be your suggestion to prevent such loops?

>By the way,can a portal become WSRP Producer and WSRP Consumer 
>according to your described senario?
>
Definitly yes!

> In other words, 
>Are Producer/Consumer just the terms wich represent one aspects 
>of the functionality a portal provides: produce/consume service?
>
partially correct.
In general yes, but "just terms" is a little bit misleading.
The terms "Producer" and "Consumer" are terms defined by the WSRP spec.
That's why I was referring to them.


cheers,
Richard


Re: About WSRP4J Consumer

Posted by Masumi Ito <ma...@mb.infosnow.ne.jp>.
Hello, Richard.
Thank you for your quick response and in-depth explanation ! 

Richard Jacob <ja...@apache.org> wrote:

> Yes, the current SwingConumer implementation could be viewed as a portal 
> (please guys, don't beat be).
> The swing consumer is a simple test application, that has basic 
> aggregation, etc.
> It's purpose is to test the wsrp producer, and to demo the capabilities 
> of wsrp.
> One typical usage scenerio we see for wsrp is a portal conuming wsrp 
> services as remote portlets.
> Therefor we started to describe what we understand as a proxy portlet here.
> I'm currently working on it and hope to be able to release it soon.

> As said above the proxy portlet would be another wsrp consumer that 
> could be plugged into JSR168 containers/portals.

I understand that SwingConsumer is a portal conuming wsrp services.
but I don't know the reason that a proxy portlet is required 
when WSRP Consumer consumes service.
The communication between WSRP Consumer and WSRP Producer uses 
the Stub generated from WSDL by Axis' capability.
A proxy portlet differs from this stub, doesn't it?

Or do I have the wrong idea about the meaning the term "portal" 
indicates?
In my perception, a portal has only the functionality of 
aggregation as a portal server and delegates the management of 
portlets' life cycle to portlet containers which are components 
separated from a portal.
But I wonder a portal contains not only aggregating application 
but also portlet containers which deal with local portlets and a
proxy portlet.In other words, WSRP Consumer as well as WSRP 
Producer has portlet containers?

In JSR168, a portal and a portlet container can be built 
together as a single component of an application suite or as two 
separate components of a portal application.

Which concept does a portal called "WSRP Consumer" correspond to?

If the former(a single component) is right , WSRP Consumer may 
be able to manage to portlets; direct access to local portlets 
and indirect access to remote portlets via a proxy portlet. And 
WSRP Consumer may be ought to use a proxy portlet when WSRP 
Consumer accesses to WSRP Producer via WSRP protocol.


> What do you mean by "is in local/remote environment" ?

> What do you mean by can't forward?
> 
> I'm not sure I get the whole point here, could you try to rephrase?

Sorry for my confusing explanations.
The scenario you provide for me is simple and understandable.
Please let me use your scenario to explain my thinking.

> Assume the following scenario:
> - Portal A hosts portlet A
> - Portal B hosts portlet B
> In that case both portals would advertise their portlets to UDDI.

> Another consumere like portal C could search UDDI for A or B and find 
> the producers.

> - Portal A integrates portlet B (via a proxy portlet) named B'
> - Portal A publishes B' into UDDI
> The the consumer C could easily find B' and use it.
> Portal A would then proxy the request for B' to B.

First, UDDI should be registerd in the follwing state:
  -	portal A hosts portlet A and portlet B
  -	portal B hosts portlet B

The reason:
If consumer C find thd description that portal A hosts B' in 
UDDI, it can't judge that B' is equal to B except for name. So 
consumer may consider B' differes from B.

When consumer C searches UDDI for the producer which hosts 
portlet B in this situation, it hits producer A and B.
The decision of A or B is entrusted to End-User.
If B is selected, consumer directly binds B without using proxy 
mechanism.
If A is selected, consumer sends request for B to B'.And then 
B' also searches UDDI for producer which hosts B on the purpose 
of finding the entity of B.
At this moment, the choice of A or B automatically must be 
decided unlike in the case of the previous decision.
Now then, if A is continuously selected a number of times, 
consumer can't get the entitiy of B all along.
This means that a proxy portlet refers to a potal which manages 
to it, i.e., self-reference.



By the way,can a portal become WSRP Producer and WSRP Consumer 
according to your described senario? In other words, 
Are Producer/Consumer just the terms wich represent one aspects 
of the functionality a portal provides: produce/consume service?
Because portal A and portal B act as WSRP Producer and portal C 
acts as WSRP Consumer though they are referd to as portal. Of 
course, potal C is bound to act as WSRP Producer when the other 
portal accesses to C for consuming WSRP Service C provides.



------------------------------------------------------------
Masumi Ito <ma...@complex.eng.hokudai.ac.jp>
------------------------------------------------------------

Re: About WSRP4J Consumer

Posted by Richard Jacob <ja...@apache.org>.
Hi Masumi,

Masumi Ito wrote:

>Hello.
>
>I roughly read WSRP Specification and Java Portlet Specification.
>I have understood that the role of Portal server and Portlet 
>container in JSR 168 are equivarent to that of Consumer and 
>Producer in WSRP.
>But, Investigating this mailing lists and WSRP4J's Home Pages,
>I saw the statement that Consumer are pluged in Portlet 
>container as a generic proxy portlet to 
>consume remote services that are provided by remote Producer.
>Isn't Consumer a portal which aggregates the contents and 
>presents them to the End-User?
>
Yes, the current SwingConumer implementation could be viewed as a portal 
(please guys, don't beat be).
The swing consumer is a simple test application, that has basic 
aggregation, etc.
It's purpose is to test the wsrp producer, and to demo the capabilities 
of wsrp.
One typical usage scenerio we see for wsrp is a portal conuming wsrp 
services as remote portlets.
Therefor we started to describe what we understand as a proxy portlet here.
I'm currently working on it and hope to be able to release it soon.

>Or the concept that Consumer acts as a proxy portlet is WSRP4J 
>original?
>
As said above the proxy portlet would be another wsrp consumer that 
could be plugged into JSR168 containers/portals.

>Otherwise, Consumer has the both functionarity?
>
>And if using a proxy portlet of Consumer,I think there is 
>the following problem.
>
>assume the following scenario:
>* We want to get the markup contents from portlet A and B.      
>* Producer A which is in local environment contains portlet A.   
>* Producer B which is in remote environment contains portlet B.  
>
What do you mean by "is in local/remote environment" ?

>* Producer A has Consumer as a proxy portlet, and We access to 
>portlet B on Producer B via Consumer.
>* Consumer use UDDI to find Producer which has the targeted 
>portlet.
>
>In this case, UDDI must be described that Producer A has both 
>portlet A and B. 
>Because portal(Consumer) can't forward the PortletRequest for 
>Portlet B from End-User to Producer A if portal can't find the 
>statement that Producer A has portlet B in UDDI.
>
What do you mean by can't forward?

>But if there is such a statement in UDDI, the proxy 
>portlet(Consumer) received the request may find not Producer B 
>but Producer A as Producer which has the entity of portlet B.
>Thereby We may go into an infinite loop!
>
I'm not sure I get the whole point here, could you try to rephrase?

Assume the following scenario:
- Portal A hosts portlet A
- Portal B hosts portlet B
In that case both portals would advertise their portlets to UDDI.
Another consumere like portal C could search UDDI for A or B and find 
the producers.

- Portal A integrates portlet B (via a proxy portlet) named B'
- Portal A publishes B' into UDDI
The the consumer C could easily find B' and use it.
Portal A would then proxy the request for B' to B.

Cheers,
Richard