OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

wsrp-interop message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [no subject]


I'm not convinced there is a lack of clarity in the spec in this area, but =

there certainly are a number of rat holes one can get into if certain=20
implementation choices are made.

Rich=20



Alejandro Abdelnur <Alejandro.Abdelnur@Sun.COM>=20
Sent by: Alejandro.Abdelnur@Sun.COM
11/19/2003 01:38 PM

To
wsrp-interop@lists.oasis-open.org
cc

Subject
Re: [wsrp-interop] on initCookies and sessionID






The lesson learned from this one is 'Do not mistake session with=20
session' :)

I think it would help if we clarify the spec on this.

Thanks.

Alejandro

On Wednesday, November 19, 2003, at 04:52  AM, Rich Thompson wrote:

>
> My take on the answers:
>
> First, overall comments: Private sessions between the end-user and=20
> particular instances of a portlet are modeled in the protocol via=20
> sessionID. It was also recognized that various systems have reasons to=20
> use a cookie to carry session information, though these types of=20
> sessions are not always unique to a portlet instance. As a result,=20
> these two tend to closely parallel each other while never being >=20
linked.
>
> Q1. Is there any required relationship between the cookies returned by=20
> initCookie and the sessionID returned by the markup interface calls?
> A1. No, though if the CookieProtocol is perUser then they do carry the=20
> same semantics.
>
> Q2. If a call returns an InvalidCookie fault, should the consumer=20
> discard the sessionID?
> A2. No, the cookies are independent of the private sessionID and are=20
> not necessarily related to a session at all.
>
> Q3. If a call returns an InvalidSession fault, should the consumer=20
> call initCookie again?
> A3. same as A2.
>
> Sorry if the fault descriptions are confusing:
>  - InvalidSession fault is used only when the private session has=20
> timed out and required data had been cached in the session (templates=20
> or UserContext). If the session did not contain such data or it is=20
> also available via the supplied data on the invocation, the Producer=20
> can simply create a new session and include it in the returned data=20
> structure for future invocations from the Consumer.
>  - InvalidCookie fault is used only when the cookies established by=20
> initCookie become invalid. This signals to the Consumer the need to=20
> invoke initCookie again. Since some Producers will establish a session=20
> related to these cookies, it would be wise for the Consumer to resend=20
> templates and UserContext when reinvoking the operation that caused=20
> the InvalidCookie fault as this can avoid the next invocation=20
> returning an InvalidSession fault.
>
> Rich
>
>
<image.tiff>
>
>
>
>
>
> One of the engineers in my group (punished with implementing WSRP) came
> to me with the following questions and I could not find an answer for
> her. I would like to know what is your opinion on this and how are you
> handling this scenario.
>
> Thanks
>
> Alejandro
>
> * Producer requires initCookie.
> * Consumer uses more than one portlet from the producer for
>   the portal page of a user.
> * initCookie has been called upfront.
> * performBlockingInteraction and/or getMarkup have returned a sessionID
>
> Q1. Is there any required relationship between the cookies returned by
> initCookie and the sessionID returned by the markup interface calls?
>
> Q2. If a call returns an InvalidCookie fault, should the consumer
> discard the sessionID?
>
> Q3. If a call returns an InvalidSession fault, should the consumer call
> initCookie again?
>
> If the answer is 'no' to all the questions, then the following sections
> of the spec make things more confusing:
>
> P27/L27 "If the Producer returns an InvalidSession fault message after
> returning a sessionID, the Consumer MUST NOT resupply that sessionID on
> a subsequent invocation and SHOULD reinvoke the operation that caused
> the fault message without any sessionID and supply any data that may
> have been stored in the session."
>
> P44/L6 "If at any time the Producer throws a fault message
> (?InvalidCookie?) indicating the supplied cookies have been invalidated
> at the Producer, then the Consumer MUST again invoke initCookie() and
> SHOULD reprocess the invocation that caused the fault message to be
> thrown and include any data that may have been stored in a session
> related to a cookie"
>
> P77/Table,Row=3DInvalidCookie "InvalidCookie Used only when the
> environment at the Producer has timed out AND the Producer needs the
> Consumer to invoke initCookie() again and resend data that may have
> been stored in sessions related to a cookie."
>
> P77/Table,Row=3DInvalidSession "Used only when a Producer session has
> timed out AND the Producer needs the Consumer to invoke resend data
> that may have been cached in the session."
>
>
>


--=_alternative 006EC5D285256DE3_=
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable


<br><font size=3D2 face=3D"sans-serif">I think this is exactly the problem.
There are a number of independent concepts of session involved:</font>
<br>
<br><font size=3D2 face=3D"sans-serif">1. The User's session with the Consu=
mer
=3D&gt; rarely seems to be a problem in the discussion</font>
<br><font size=3D2 face=3D"sans-serif">2. An http session between the Consu=
mer
and the Producer =3D&gt; only appearance in the protocol is the requirements
around handling cookies properly.</font>
<br><font size=3D2 face=3D"sans-serif">3. A WSRP session (Mike calls it an
entity session based on earlier terminology). This is represented by the
sessionID in the protocol. <b>SOME</b> producer implementations <b>MAY</b>
map this to the http session. I would encourage those implementations to
only return a sessionID when needed to indicate templates or UserContext
is being cached or to avoid collisions with multiple instances using the
same portletHandle. <b>Other</b> implementations <b>MAY</b> map this as
a finer scoped session within the http session (i.e. using groupIDs). Again,
I would encourage those implementations to find means to not return a sessi=
onID
outside the caching and collision concerns.</font>
<br>
<br><font size=3D2 face=3D"sans-serif">From the protocol's point of view, t=
hese
three concepts of sessions are independent of each other. When Producer
implementations choose to correlate them, it the job of the implementation
to correctly sort out the issues introduced as the Consumer can not assume
or determine that such a correlation exists. </font>
<br>
<br><font size=3D2 face=3D"sans-serif">From the Consumer perspective, knowl=
edge
that such Producer implementations will exist should drive how the InvalidC=
ookie
fault is handled. The Consumer should not assume the WSRP session is invali=
d,
but should supply those items that may have been cached so that in the
case where it did become invalid, the Producer is able to create a new
session without an extra roundtrip for an InvalidSession fault.</font>
<br>
<br><font size=3D2 face=3D"sans-serif">I'm not convinced there is a lack of
clarity in the spec in this area, but there certainly are a number of rat
holes one can get into if certain implementation choices are made.</font>
<br><font size=3D2 face=3D"sans-serif"><br>
Rich </font>
<br>
<br>
<br>
<table width=3D100%>
<tr valign=3Dtop>
<td width=3D40%><font size=3D1 face=3D"sans-serif"><b>Alejandro Abdelnur &l=
t;Alejandro.Abdelnur@Sun.COM&gt;</b>
</font>
<br><font size=3D1 face=3D"sans-serif">Sent by: Alejandro.Abdelnur@Sun.COM<=
/font>
<p><font size=3D1 face=3D"sans-serif">11/19/2003 01:38 PM</font>
<td width=3D59%>
<table width=3D100%>
<tr>
<td>
<div align=3Dright><font size=3D1 face=3D"sans-serif">To</font></div>
<td valign=3Dtop><font size=3D1 face=3D"sans-serif">wsrp-interop@lists.oasi=
s-open.org</font>
<tr>
<td>
<div align=3Dright><font size=3D1 face=3D"sans-serif">cc</font></div>
<td valign=3Dtop>
<tr>
<td>
<div align=3Dright><font size=3D1 face=3D"sans-serif">Subject</font></div>
<td valign=3Dtop><font size=3D1 face=3D"sans-serif">Re: [wsrp-interop] on i=
nitCookies
and sessionID</font></table>
<br>
<table>
<tr valign=3Dtop>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=3D2><tt>The lesson learned from this one is 'Do not mistake
session with <br>
session' :)<br>
<br>
I think it would help if we clarify the spec on this.<br>
<br>
Thanks.<br>
<br>
Alejandro<br>
<br>
On Wednesday, November 19, 2003, at 04:52 &nbsp;AM, Rich Thompson wrote:<br>
<br>
&gt;<br>
&gt; My take on the answers:<br>
&gt;<br>
&gt; First, overall comments: Private sessions between the end-user and
<br>
&gt; particular instances of a portlet are modeled in the protocol via
<br>
&gt; sessionID. It was also recognized that various systems have reasons
to <br>
&gt; use a cookie to carry session information, though these types of <br>
&gt; sessions are not always unique to a portlet instance. As a result,
<br>
&gt; these two tend to closely parallel each other while never being &gt;
linked.<br>
&gt;<br>
&gt; Q1. Is there any required relationship between the cookies returned
by <br>
&gt; initCookie and the sessionID returned by the markup interface calls?<b=
r>
&gt; A1. No, though if the CookieProtocol is perUser then they do carry
the <br>
&gt; same semantics.<br>
&gt;<br>
&gt; Q2. If a call returns an InvalidCookie fault, should the consumer
<br>
&gt; discard the sessionID?<br>
&gt; A2. No, the cookies are independent of the private sessionID and are
<br>
&gt; not necessarily related to a session at all.<br>
&gt;<br>
&gt; Q3. If a call returns an InvalidSession fault, should the consumer
<br>
&gt; call initCookie again?<br>
&gt; A3. same as A2.<br>
&gt;<br>
&gt; Sorry if the fault descriptions are confusing:<br>
&gt; &nbsp;- InvalidSession fault is used only when the private session
has <br>
&gt; timed out and required data had been cached in the session (templates
<br>
&gt; or UserContext). If the session did not contain such data or it is
<br>
&gt; also available via the supplied data on the invocation, the Producer
<br>
&gt; can simply create a new session and include it in the returned data
<br>
&gt; structure for future invocations from the Consumer.<br>
&gt; &nbsp;- InvalidCookie fault is used only when the cookies established
by <br>
&gt; initCookie become invalid. This signals to the Consumer the need to
<br>
&gt; invoke initCookie again. Since some Producers will establish a session
<br>
&gt; related to these cookies, it would be wise for the Consumer to resend
<br>
&gt; templates and UserContext when reinvoking the operation that caused
<br>
&gt; the InvalidCookie fault as this can avoid the next invocation <br>
&gt; returning an InvalidSession fault.<br>
&gt;<br>
&gt; Rich<br>
&gt;<br>
&gt;<br>
&lt;image.tiff&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; One of the engineers in my group (punished with implementing WSRP)
came<br>
&gt; to me with the following questions and I could not find an answer
for<br>
&gt; her. I would like to know what is your opinion on this and how are
you<br>
&gt; handling this scenario.<br>
&gt;<br>
&gt; Thanks<br>
&gt;<br>
&gt; Alejandro<br>
&gt;<br>
&gt; * Producer requires initCookie.<br>
&gt; * Consumer uses more than one portlet from the producer for<br>
&gt; &nbsp; the portal page of a user.<br>
&gt; * initCookie has been called upfront.<br>
&gt; * performBlockingInteraction and/or getMarkup have returned a sessionI=
D<br>
&gt;<br>
&gt; Q1. Is there any required relationship between the cookies returned
by<br>
&gt; initCookie and the sessionID returned by the markup interface calls?<b=
r>
&gt;<br>
&gt; Q2. If a call returns an InvalidCookie fault, should the consumer<br>
&gt; discard the sessionID?<br>
&gt;<br>
&gt; Q3. If a call returns an InvalidSession fault, should the consumer
call<br>
&gt; initCookie again?<br>
&gt;<br>
&gt; If the answer is 'no' to all the questions, then the following section=
s<br>
&gt; of the spec make things more confusing:<br>
&gt;<br>
&gt; P27/L27 &quot;If the Producer returns an InvalidSession fault message
after<br>
&gt; returning a sessionID, the Consumer MUST NOT resupply that sessionID
on<br>
&gt; a subsequent invocation and SHOULD reinvoke the operation that caused<=
br>
&gt; the fault message without any sessionID and supply any data that may<b=
r>
&gt; have been stored in the session.&quot;<br>
&gt;<br>
&gt; P44/L6 &quot;If at any time the Producer throws a fault message<br>
&gt; (&#8220;InvalidCookie&#8221;) indicating the supplied cookies have bee=
n invalidated<br>
&gt; at the Producer, then the Consumer MUST again invoke initCookie()
and<br>
&gt; SHOULD reprocess the invocation that caused the fault message to be<br>
&gt; thrown and include any data that may have been stored in a session<br>
&gt; related to a cookie&quot;<br>
&gt;<br>
&gt; P77/Table,Row=3DInvalidCookie &quot;InvalidCookie Used only when the<b=
r>
&gt; environment at the Producer has timed out AND the Producer needs the<b=
r>
&gt; Consumer to invoke initCookie() again and resend data that may have<br>
&gt; been stored in sessions related to a cookie.&quot;<br>
&gt;<br>
&gt; P77/Table,Row=3DInvalidSession &quot;Used only when a Producer session
has<br>
&gt; timed out AND the Producer needs the Consumer to invoke resend data<br>
&gt; that may have been cached in the session.&quot;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</tt></font>
<br>
--=_alternative 006EC5D285256DE3_=--


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]