<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">I have one concern of using the
websocket. Do we need another port for the<br>
socket. If so, we might need to take the security issue into
consideration. Do<br>
we have some methods that prevent these insecure scenarios? <br>
<br>
<br>
On 7/2/2014 11:06 PM, Sheldon wrote:<br>
</div>
<blockquote cite="mid:53B41FF4.6030701@linux.vnet.ibm.com"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 06/27/2014 07:15 PM, Wen Wang
wrote:<br>
</div>
<blockquote cite="mid:53AD524B.6020909@linux.vnet.ibm.com"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Dear all,<br>
<b><br>
</b><b>Problems:</b><br>
Now our strategy for long time operation is using task which
the browser needs to check up-to-date task status time by time
until the task ends. It's time consuming and less efficient.
Also there exists several problems when locating each task when
doing debug generating and storage pool as well as some new
features that might use task strategy in the future. <br>
<br>
<b>Solution</b>:<br>
As talked with Sheldon and Zhengsheng, we came up with a
solution that avoid browser checking status every 200ms. Also,
we might need some more labels in each task to provide more
information when getting the task like we might need to indicate
which operation triggered certain task. What's in our mind is to
use the strategy that allow the server inform browser about the
task information. Our proposal is designed as follows.<br>
<br>
1) Browser needs to register to the back end to indicate which
part the result needs to reply to when the task finished.<br>
2) The back end use broker to manage message distribution: when
a task is finished or experiencing an error, back end inform the
browser certain part of work is finished or error.<br>
3) Using websocket of cherrypy to accomplish the message
transfer.<br>
</blockquote>
Now let me elaborate above.<br>
<br>
For Browser, it can be an event loop worker.<br>
It can subscribe event message that users care to the back end
broker.<br>
listen the events from the broker and take some action for the
event.<br>
<br>
For back:<br>
The broker should collect and store the events from everywhere. <br>
The broker should dispatch the message to the client who
subscribes it. <br>
For some event, broker should determined whether it should
dispatch to user. <br>
Such a VM shutdown event, the broker just send it to the user who
has the access permission. (Yu Xing's suggestion)<br>
We had better define the event message format.<br>
<br>
We had better to find an existing python lib for it. If no we
should code it for ourself. <br>
[
client1
]
<br>
care VM | ^<br>
libvirt event -------------\ shutdown | | VM
shutdown<br>
\ V
| <br>
event 1 -------- -------------------------->[ broker ] <br>
/ ^
| dispatch<br>
event 2 ------------/ | |
<br>
subscribe | V
listen<br>
[
client2 ]<br>
<br>
<br>
For websocket:<br>
There's also an issue about it. <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="https://github.com/kimchi-project/kimchi/issues/22">https://github.com/kimchi-project/kimchi/issues/22</a>
<br>
The websocket is the pipe to connect the broker of the UI event
worker. <br>
We should support websocket proxying directly from the cherrypy
server on its given port. <br>
Zheng Sheng is working on it. It can work on cherrypy. Seems
something wrong with nginx. <br>
<br>
<br>
<br>
<blockquote cite="mid:53AD524B.6020909@linux.vnet.ibm.com"
type="cite"> <br>
Best Regards<br>
<br>
Wang Wen<br>
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kimchi-devel mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Kimchi-devel@ovirt.org">Kimchi-devel@ovirt.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel">http://lists.ovirt.org/mailman/listinfo/kimchi-devel</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Thanks and best regards!
Sheldon Feng(冯少合)<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com"><shaohef@linux.vnet.ibm.com></a>
IBM Linux Technology Center</pre>
</blockquote>
<br>
</body>
</html>