[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-filesystem-dev
Subject:    RE: [Filesystem-dev] CR: READ_ERROR happen when seek action sometimes
From:       Henry Xing <hxing () real ! com>
Date:       2011-07-14 14:11:43
Message-ID: 7ECCEA249B7CDC49A079EC0075E999AA082C336078 () SEAMBX ! corp ! real ! com
[Download RAW message or body]

Thanks for your comments, checked into 310 and 361 branch for now
henry
________________________________
From: Qiang Luo
Sent: Thursday, July 14, 2011 9:43 PM
To: Sheldon Fu
Cc: Henry Xing; filesystem-dev@helixcommunity.org
Subject: Re: [Filesystem-dev] CR: READ_ERROR happen when seek action someti=
mes

Thanks for the comments Sheldon.  Let's discuss this further offline.

Qiang

On 7/14/2011 6:29 AM, Sheldon Fu wrote:
I don't think this can be done. There is no way in http to tell the server =
to stop sending data for a GET request, without actually closing the connec=
tion. And since we always request the whole file, waiting for the GET respo=
nse to finish all the data for the previous file isn't an option. The only =
choice here is to close the connection.

Now with all these fixes, I feel that the design of this 'socket reuse' log=
ic may merit some more discussion. Ideally, it should be implemented at the=
 http file system level, not the file object level. E.g, the http file syst=
em could keep the connection open to the server until certain timeout time =
(e.g. 5s) then for any further request (that means new file object) on the =
same server, it could decide to re-use a connection, but only if the connec=
tion is *idle* at the moment, basically having a socket/connection manager.=
 This is how web browsers behave and what the web server will expect.

With this it is also possible to implement pipelining -- a new file object =
could be created with a flag saying 'i can wait to be pipelined' so that it=
 can wait for the previous file on the same server to finish before it gets=
 any data.

Unlike the current implementation, most of these would be transparent to th=
e user of the http FS.

fxd

On 07/14/2011 08:28 AM, Qiang Luo wrote:
Hi Henry,

Looks OK for now.  Please check into 310 and 361 branches.

The current restriction means that under the following conditions, we can n=
ot re-sue the socket:
1) if "Content-Length" is not set in HTTP Reponse.
2) if a previous GET message have been sent to server, but the response hav=
e not come back yet
3) if the previous download is not complete yet (i.e, m_nContentRead < m_nC=
ontentSize)

Therefore, the chance that the client can reuse the socket under "seeking i=
nto a new file" is low.  Ideally, we still want to re-use the socket under =
those conditions.  Long term, we should detect and mark in reset() if any G=
ET response and socket read response pending for the previous url and ignor=
e the responses.

Thanks,
Qiang

On 7/14/2011 2:50 AM, Henry Xing wrote:
Modified by: hxing@real.com<mailto:hxing@real.com>
Project: HLS for LGE bryce

Synopsis: READ_ERROR happen when seek sometimes
Overview:
  In seek action, sometimes http file system will inform the wrong file siz=
e to the file format, actually it is the last file's file size. In current =
logic, file system will reuse the socket when the last url's GET message ha=
ve been sent to server, but the response have no come back, when the respon=
se come, it was recognized as the response of url of seek action.
 This update disable the socket reuse when last GET message have been sent =
out.  Another fix method is to force re-create a new socket when seek actio=
n, this lose the opportunity of reuse socket, so select this one.
   test it on 361branch and 8x55 chipset

Files Modified:
filesystem/http/httpfsys.cpp
Platforms and Profiles Affected:

Platform: 361, 310, head

Profile: helix-client-android-full

Copyright assignment: I am a RealNetworks employee or contractor

Best Regards

Henry hhsing






[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:st1="urn:schemas-microsoft-com:office:smarttags" \
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.5pt;
	font-family:"Times New Roman";
	color:black;}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal;
	font-family:Arial;
	color:windowtext;}
span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:Arial;
	color:navy;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	layout-grid:15.6pt;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=white lang=ZH-CN link=blue vlink=purple>

<div class=Section1 style='layout-grid:15.6pt'>

<p class=MsoNormal><font size=1 color=navy face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial;color:navy'>Thanks for your comments,
checked into 310 and 361 branch for now<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial;color:navy'>henry<o:p></o:p></span></font></p>


<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
color=black face="Times New Roman"><span lang=EN-US style='font-size:12.0pt;
color:windowtext'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal align=left style='text-align:left'><b><font size=2
color=black face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:
Tahoma;color:windowtext;font-weight:bold'>From:</span></font></b><font size=2
color=black face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:
Tahoma;color:windowtext'> Qiang Luo <br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, July 14, 2011 9:43
PM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">Sheldon
 Fu</st1:PersonName><br>
<b><span style='font-weight:bold'>Cc:</span></b> Henry Xing; <st1:PersonName
w:st="on">filesystem-dev@helixcommunity.org</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Filesystem-dev] CR:
READ_ERROR happen when seek action sometimes</span></font><font size=3
color=black><span lang=EN-US \
style='font-size:12.0pt;color:windowtext'><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal align=left style='text-align:left'><font size=2 color=black
face="Times New Roman"><span lang=EN-US \
style='font-size:10.5pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face="Times New Roman"><span
lang=EN-US style='font-size:10.5pt'>Thanks for the comments Sheldon.&nbsp;
Let's discuss this further offline.<br>
<br>
Qiang<br>
<br>
On 7/14/2011 6:29 AM, <st1:PersonName w:st="on">Sheldon Fu</st1:PersonName>
wrote: <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face="Times New Roman"><span
lang=EN-US style='font-size:10.5pt'>I don't think this can be done. There is no
way in http to tell the server to stop sending data for a GET request, without
actually closing the connection. And since we always request the whole file,
waiting for the GET response to finish all the data for the previous file isn't
an option. The only choice here is to close the connection.<br>
<br>
Now with all these fixes, I feel that the design of this 'socket reuse' logic
may merit some more discussion. Ideally, it should be implemented at the http
file system level, not the file object level. E.g, the http file system could
keep the connection open to the server until certain timeout time (e.g. 5s)
then for any further request (that means new file object) on the same server,
it could decide to re-use a connection, but only if the connection is *idle* at
the moment, basically having a socket/connection manager. This is how web
browsers behave and what the web server will expect. <br>
<br>
With this it is also possible to implement pipelining -- a new file object
could be created with a flag saying 'i can wait to be pipelined' so that it can
wait for the previous file on the same server to finish before it gets any
data.<br>
<br>
Unlike the current implementation, most of these would be transparent to the
user of the http FS.<br>
<br>
fxd<br>
<br>
On 07/14/2011 08:28 AM, Qiang Luo wrote: <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face="Times New Roman"><span
lang=EN-US style='font-size:10.5pt'>Hi Henry,<br>
<br>
Looks OK for now.&nbsp; Please check into 310 and 361 branches.<br>
<br>
The current restriction means that under the following conditions, we can not
re-sue the socket:<br>
1) if &quot;Content-Length&quot; is not set in HTTP Reponse.<br>
2) if a previous GET message have been sent to server, but the response have
not come back yet<br>
3) if the previous download is not complete yet (i.e, m_nContentRead &lt;
m_nContentSize)<br>
<br>
Therefore, the chance that the client can reuse the socket under &quot;seeking
into a new file&quot; is low.&nbsp; Ideally, we still want to re-use the socket
under those conditions.&nbsp; Long term, we should detect and mark in reset()
if any GET response and socket read response pending for the previous url and
ignore the responses.<br>
<br>
Thanks,<br>
Qiang<br>
<br>
On 7/14/2011 2:50 AM, Henry Xing wrote: <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'><!--[if gte mso 9]><xml>
 <u1:shapedefaults u2:ext="edit" spidmax="1026"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <u3:shapelayout u4:ext="edit">
  <u3:idmap u4:ext="edit" data="1"/>
 </u3:shapelayout>
</xml><![endif]-->Modified by: <a href="mailto:hxing@real.com"
moz-do-not-send=true>hxing@real.com</a><u5:p></u5:p></span></font><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'>Project: HLS for LGE \
bryce<u5:p></u5:p></span></font><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'><u5:p>&nbsp;</u5:p></span></font><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'>Synopsis: READ_ERROR happen when seek
sometimes<u5:p></u5:p></span></font><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'>Overview: <u5:p></u5:p></span></font><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'>&nbsp; In seek action, sometimes http
file system will inform the wrong file size to the file format, actually it is
the last file&#8217;s file size. In current logic, file system will reuse the socket
when the last url&#8217;s GET message have been sent to server, but the response have
no come back, when the response come, it was recognized as the response of url
of seek action.<u5:p></u5:p></span></font><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'>&nbsp;This update disable the socket
reuse when last GET message have been sent out. &nbsp;Another fix method is to
force re-create a new socket when seek action, this lose the opportunity of reuse
socket, so select this one.<u5:p></u5:p></span></font><span \
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'>&nbsp; &nbsp;test it on 361branch and
8x55 chipset<u5:p></u5:p></span></font><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'><u5:p>&nbsp;</u5:p></span></font><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'>Files Modified:&nbsp; \
<u5:p></u5:p></span></font><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:18.0pt'><font size=1 color=black
face=Arial><span lang=EN-US \
style='font-size:9.0pt;font-family:Arial'>filesystem/http/httpfsys.cpp</span></font><span
 lang=EN-US><u5:p></u5:p><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'>Platforms and Profiles \
Affected:<u5:p></u5:p></span></font><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'><u5:p>&nbsp;</u5:p></span></font><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'>Platform: 361, 310, head \
<u5:p></u5:p></span></font><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'><u5:p>&nbsp;</u5:p></span></font><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'>Profile: \
helix-client-android-full<u5:p></u5:p></span></font><span \
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'><u5:p>&nbsp;</u5:p></span></font><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'>Copyright assignment: I am a RealNetworks
employee or contractor<u5:p></u5:p></span></font><span \
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'><u5:p>&nbsp;</u5:p></span></font><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'>Best \
Regards<u5:p></u5:p></span></font><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'><u5:p>&nbsp;</u5:p></span></font><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'>Henry \
hhsing<u5:p></u5:p></span></font><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'><u5:p>&nbsp;</u5:p></span></font><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span lang=EN-US
style='font-size:9.0pt;font-family:Arial'><u5:p>&nbsp;</u5:p></span></font><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal align=left style='text-align:left'><font size=3 color=black
face="Times New Roman"><span lang=EN-US \
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left'><font size=3 color=black
face="Times New Roman"><span lang=EN-US \
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal align=left style='text-align:left'><font size=3 color=black
face="Times New Roman"><span lang=EN-US \
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>



_______________________________________________
Filesystem-dev mailing list
Filesystem-dev@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/filesystem-dev

--===============2023470949==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic