<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta content="text/html;charset=us-ascii" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
Ken Nielson wrote:
<pre wrap="">----- Original Message -----
<pre wrap="">From: "Donald Neal" <a class="moz-txt-link-rfc2396E" href="mailto:email@example.com"><firstname.lastname@example.org></a>
To: "Torque Developers mailing list" <a class="moz-txt-link-rfc2396E" href="mailto:email@example.com"><firstname.lastname@example.org></a>
Sent: Thursday, August 11, 2011 6:05:59 PM
Subject: [torquedev] IP version-agnostic Address Representation
There are a range of cases in Torque where an IP address is
by a 32-bit object. This is something of a problem where the IP
may actually be 128 bits long.
I see two distinct cases here. In one the 32-bit object is being used
a key (as with AvlNode). In this case I propose initially to take the
lower-order 32 bits of an IPv6 address and keep going as now. This is
simple and effiicient, but would definitely give rise to collisions
which will confuse people in future.
So the key does in future need to change. My inclination is to use a
struct created for the purpose containing two uint64_t's. But there
definitely other ways of doing this.
In the other case, the address is not used as a key (as in struct
pbsnode, say). That makes it viable to use either a struct containing
the minimum fields necessary or a sockaddr*. I'm inclined towards the
latter on the grounds that keeping down the number of struct types in
use makes life simpler, But again there are clearly other ways of
Does anyone have a view on this? Does anyone have any other reason to
use a package like gmp, which I don't see as needed for this purpose
- Donald Neal
The current scheme TORQUE uses to identify trusted hosts is to use the host name and IPv4 ip address. The 32-bit IP address is used as a key to store trusted addresses in an AVL tree. The convenient thing about using this scheme is that connections are verified without the need to read any data from the stream. With the 128-bit IPv6 address the AVL tree is broken. We could change the AVL-tree to take a 128 bit key and then pad the IPv4 addresses. (I am just brain-storming).
Another thought is to have the server assign a random number to each MOM and then distribute those numbers across the cluster. This would require a change in the protocol. It also requires a reading of the incoming stream to get the number.
Just some thoughts.
>From the (limited) discussion, I'm inclined to conclude<br>
i) Noone has another use for gmp, so general-purpose large objects are
not the answer.<br>
ii)) Replacing the 32-bit key in AvlNode with a struct of two
uint64_t's is as good an idea as anything else.<br>
I'm still in two minds whether to replace things like pbs_net_t with
the same two uint64_t's, or to use *sockaddr in place of everything.<br>
- Donald Neal<br>
<pre class="moz-signature" cols="72">--
Donald Neal |"We're not going to have any riots around
| here. It doesn't matter if you're Turkish,
High Performance Computing | if you live round here we'll defend you."
The University of Waikato | - Aykut Boyraz