<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">On 06/05/2014 08:53 PM, Aline Manera
wrote:<br>
</div>
<blockquote cite="mid:53906866.7080502@linux.vnet.ibm.com"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 04/17/2014 10:38 AM, Sheldon
wrote:<br>
</div>
<blockquote cite="mid:534FD96F.7060106@linux.vnet.ibm.com"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
I'd like to talk about how to discover Kimchi peers.<br>
<br>
Now I just talk about discover a peer in a same network here.<br>
<br>
I will use a <a moz-do-not-send="true"
href="http://en.wikipedia.org/wiki/Multicast_address#Local_subnetwork">local
multicast subnetwork address</a> to find peers in one network.
<br>
Choose 224.0.0.132 as the kimchi multicast address, and 8000 as
the port.<br>
<br>
</blockquote>
<br>
How will you choose the multicast address?<br>
<br>
You can not assume all Kimchi servers is running in the default
port 8000<br>
The user can change it.<br>
<br>
In my mind I think we should send a broadcast message in the
network and wait for the responses.<br>
And we need to add a hook in Kimchi to respond to those messages
with the IP and port number Kimchi is running.<br>
</blockquote>
can you elaborate how hook works?<br>
<blockquote cite="mid:53906866.7080502@linux.vnet.ibm.com"
type="cite"> <br>
<blockquote cite="mid:534FD96F.7060106@linux.vnet.ibm.com"
type="cite"> For cross network that need the router support
multicast, so I give up discover a peer cross network.<br>
I will let user add the remote peers manully.<br>
<br>
In the whole system all peers are equal. There will not be a
center discover service.<br>
<br>
We will define two kinds of multicast message Notify and Search.<br>
the format as follow. <br>
<pre wrap=""> # ____________________________________________
# | head | message body | tail |
# |___________________|_________________|______|
# |sizeof(messageBody)| json message | EOL |
# |___________________|_________________|______|</pre>
<br>
the flow of discover Kimchi peers:<br>
1. one host multicast a "search" message. in this message it
tell himself information, and ask others tell their information.<br>
Like this: <br>
{"search": {"domain": "kimchi-host1", "IP": "192.168.0.3",
"httpport": "8000", "httpsport": "8001"}}<br>
this means "hello, I'm a kimchi host, this is my information,
can you tell me who you are?"<br>
2. others received a search will response an "notify" message.<br>
Like this:<br>
{"notify": {"domain": "kimchi-host1", "IP": "192.168.0.3",
"httpport": "8000", "httpsport": "8001"}}<br>
this tells others that "hi, I'm a kimchi host, I'm alive and
this is my information"<br>
<br>
o (user) 1 is "search"<br>
/\ --------> 2 is
"notify"<br>
| 1 _____
________________<br>
kimchi-host1
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
------2-<---| DB |<----2-----|multicast listen |<--2--<br>
| |____|
|_______________| |<br>
----------------------1-------------------------------> |<br>
|<br>
_____ |_____<br>
| |<br>
|
switch |<br>
| |<br>
|___________|<br>
o (user)
|<br>
/\ ---------
-----------------------------2----------------------- --->|<br>
| | _____
________________ |<br>
kimchi-host3 ------1<---| DB |<---1------|multicast
listen |<---1--|<br>
|____|
|_______________| <br>
<br>
<br>
we need to discuss:<br>
1. should we support beat heart? <br>
every kimchi host will send periodic notify to tell others
himself information?<br>
<br>
</blockquote>
<br>
I don't think we need it. Kimchi should only send the information
when it is requested for<br>
</blockquote>
ACK.<br>
<blockquote cite="mid:53906866.7080502@linux.vnet.ibm.com"
type="cite"> <br>
<blockquote cite="mid:534FD96F.7060106@linux.vnet.ibm.com"
type="cite"> <br>
2. should we support a "quit" message?<br>
"quit" message tell other peers, that this kimchi quit normally.
others can remove this from peers list.<br>
But the kimchi can not send "quit" when aborting abnormally. <br>
<br>
3. Do we store the local peers information in DB?<br>
we can collection the local peers and send them immediately when
user need to discover the peers. <br>
<br>
</blockquote>
<br>
I don't like it. It is an easy point of failure as we will make
sure the DB is consistent, ie, make other <br>
request to kimchi servers so there is no need to store that info.<br>
</blockquote>
ACK<br>
<blockquote cite="mid:53906866.7080502@linux.vnet.ibm.com"
type="cite"> <br>
<blockquote cite="mid:534FD96F.7060106@linux.vnet.ibm.com"
type="cite"> We will extend to support remote peers, these
information need to be stored in DB.<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>
<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>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Thanks and best regards!
Sheldon Feng(冯少合)<a class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com"><shaohef@linux.vnet.ibm.com></a>
IBM Linux Technology Center</pre>
</body>
</html>