Details
Description
Using auction 2.0 in a test I observed the following:
Previously, we would POST a blocking request to listen for updates
POST http://localhost:8080/auction/javax.faces.resource/listen.icepush.jsf
and get a response once a second:
<notified-pushids>apushId</notified-pushids>
Then fetch the update:
POST http://localhost:8080/auction/auction.jsf
and the update would be something like:
<?xml version='1.0' encoding='UTF-8'?>
<partial-response><changes><update id="rpt1:0:otime"><![CDATA[<span id="rpt1:0:otime">7d 1:54:53</span>]]></update><update id="rpt1:1:otime"><![CDATA[<span id="rpt1:1:otime">3d 4:54:44</span>]]></update><update id="rpt1:2:otime"><![CDATA[<span id="rpt1:2:otime">2d 7:55:34</span>]]></update><update id="rpt1:3:otime"><![CDATA[<span id="rpt1:3:otime">7:54:49</span>]]></update><update id="javax.faces.ViewState"><![CDATA[4506655347714165083:6047748643060694507]]></update></changes></partial-response>
This would occur once a second. Now, however, we're getting two updates per second. The first is similar to the above as the clock polls, but the second update seems to contain a change only to the ViewState key.
POST http://localhost:8080/auction/javax.faces.resource/listen.icepush.jsf
?xml version='1.0' encoding='UTF-8'?>
<partial-response><changes><update id="javax.faces.ViewState"><![CDATA[4506655347714165083:6047748643060694507]]></update></changes></partial-response>
Comparing the javax.faces.ViewState field from both updates, they are seen to be equal, so the second update is entirely redundant.
<![CDATA[4506655347714165083:6047748643060694507]]>
<![CDATA[4506655347714165083:6047748643060694507]]>
This means we're doing 2 pairs of requests every second.
Previously, we would POST a blocking request to listen for updates
POST http://localhost:8080/auction/javax.faces.resource/listen.icepush.jsf
and get a response once a second:
<notified-pushids>apushId</notified-pushids>
Then fetch the update:
POST http://localhost:8080/auction/auction.jsf
and the update would be something like:
<?xml version='1.0' encoding='UTF-8'?>
<partial-response><changes><update id="rpt1:0:otime"><![CDATA[<span id="rpt1:0:otime">7d 1:54:53</span>]]></update><update id="rpt1:1:otime"><![CDATA[<span id="rpt1:1:otime">3d 4:54:44</span>]]></update><update id="rpt1:2:otime"><![CDATA[<span id="rpt1:2:otime">2d 7:55:34</span>]]></update><update id="rpt1:3:otime"><![CDATA[<span id="rpt1:3:otime">7:54:49</span>]]></update><update id="javax.faces.ViewState"><![CDATA[4506655347714165083:6047748643060694507]]></update></changes></partial-response>
This would occur once a second. Now, however, we're getting two updates per second. The first is similar to the above as the clock polls, but the second update seems to contain a change only to the ViewState key.
POST http://localhost:8080/auction/javax.faces.resource/listen.icepush.jsf
?xml version='1.0' encoding='UTF-8'?>
<partial-response><changes><update id="javax.faces.ViewState"><![CDATA[4506655347714165083:6047748643060694507]]></update></changes></partial-response>
Comparing the javax.faces.ViewState field from both updates, they are seen to be equal, so the second update is entirely redundant.
<![CDATA[4506655347714165083:6047748643060694507]]>
<![CDATA[4506655347714165083:6047748643060694507]]>
This means we're doing 2 pairs of requests every second.
Issue Links
- blocks
-
ICE-7118 MyFaces 2 and Push conflict - interferes with interaction in the Auction examples when run with MyFaces
- Closed
Here's a sample of the traffic showing four requests per second:
[9.5908s] – POST /auction/javax.faces.resource/listen.icepush.xml.jsf HTTP/1.1
[9.5985s] – POST /auction/javax.faces.resource/listen.icepush.xml.jsf HTTP/1.1
[9.6387s] – POST /auction/auction.jsf HTTP/1.1
[10.589s] – POST /auction/auction.jsf HTTP/1.1
[10.595s] – POST /auction/javax.faces.resource/listen.icepush.xml.jsf HTTP/1.1
[10.605s] – POST /auction/javax.faces.resource/listen.icepush.xml.jsf HTTP/1.1
[10.628s] – POST /auction/auction.jsf HTTP/1.1
[11.595s] – POST /auction/auction.jsf HTTP/1.1
And the traffic. The two blocking requests arrive only 10ms apart. This is similar to what Deryk has seen.
[13.588s]
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: JSF/2.0
Cache-Control: no-cache
Cache-Control: no-store
Cache-Control: must-revalidate
Pragma: no-cache
Expires: 0
Content-Type: text/xml;charset=UTF-8
Content-Length: 46
Date: Tue, 04 Oct 2011 16:22:42 GMT
<notified-pushids>vd8pt42</notified-pushids>
[13.598s]
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: JSF/2.0
Cache-Control: no-cache
Cache-Control: no-store
Cache-Control: must-revalidate
Pragma: no-cache
Expires: 0
Content-Type: text/xml;charset=UTF-8
Content-Length: 46
Date: Tue, 04 Oct 2011 16:22:42 GMT
<notified-pushids>vd8pt42</notified-pushids>
[13.673s] [13.645s]
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: JSF/2.0
Cache-Control: no-cache
Content-Type: text/xml;charset=UTF-8
Content-Length: 541
Date: Tue, 04 Oct 2011 16:22:43 GMT
<?xml version='1.0' encoding='UTF-8'?>
<partial-response><changes><update id="rpt1:0:otime"><Unable to render embedded object: File (0:otime">7d 1:58:19</span>]]></update><update id="rpt1:1:otime"><) not found.[CDATA[<span id="rpt1:1:otime">3d 4:58:10</span>]]></update><update id="rpt1:2:otime"><Unable to render embedded object: File (2:otime">2d 7:59:00</span>]]></update><update id="rpt1:3:otime"><) not found.[CDATA[<span id="rpt1:3:otime">7:58:15</span>]]></update><update id="javax.faces.ViewState"><![CDATA[-1441829653106995469:-1044112092089002795]]></update></changes></partial-response>
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: JSF/2.0
Cache-Control: no-cache
Content-Type: text/xml;charset=UTF-8
Content-Length: 192
Date: Tue, 04 Oct 2011 16:22:43 GMT
<?xml version='1.0' encoding='UTF-8'?>
<partial-response><changes><update id="javax.faces.ViewState"><![CDATA[-1441829653106995469:-1044112092089002795]]></update></changes></partial-response>