Advertisement
Guest User

Untitled

a guest
Jan 26th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.68 KB | None | 0 0
  1. So we need to send a thing that says, "Get me some information, get some info." And what we do is we send a Group, for Node 2. So we're saying to this guy here, we're trying to say to the Network, "Get Group for Node 2." But, over here you've got the DHT. And it can't speak back to us; it can't get back to us... because we're not on the DHT. Remember, we are still in the IP Network. You know, the Routing network is up here; we're not on it, we've not joined it. We're trying to join it, we're not there yet. So what we need to send is, "Get Group, for Node 2," so that we can get some contact information back... that we're going to try and connect to. And, how we do that, is we relay... via, Node 1.
  2.  
  3. And that's pretty straightforward. So the network, the DHT, sees, "Ah! Message from Node 1! [??] Get Group 2." And that gets the information and sends it back to Node 1. And Node 1 then gives it back to us. And now it's just going through a relay address. So when you send... this guy here sends the message, with this guy as the source (him as the relay)---when it comes back, from being answered, that relay address is taken at the source and put into a destination again. 'Comes back here, he sees the messages for him, but notices, "Ah, there's a relay address, for Node 2! So I'll give it to Node 2, because I'm connected to him. He's down here in this IP world; he's not in the Routing world. So I'll give this message to him."
  4.  
  5. This guy here then knows the IDs: the Routing IDs! The IDs from the Routing world. It knows then, that it should be connected to him. So it says, "Alright, I know who I should be connected to, but I've got now idea how to talk to them---because I'm down here, in the pits of IP, and I need to get up to the Routing layer." So he sends another message for each of the IDs. So ID 1... he will send a connect message, saying, "Please connect to me!" And that again will go through here as a relay message to the DHT network. And, ID 1 over here... will see, "Oh! That's a connect request from somebody that I should be connected to, because he's got an ID." (Sentinel does the checking of keys now, so we'll that for Sentinel.) So this guy says, "I want to connect to ID 1."
  6.  
  7. And this guy might make millions of connect requests, to get 3 or 4 connections. Later on, you'll see how that happens. But keep that in mind that, getting in close group connections is probably a 1:1 "you'll ask for a connection and get it." Get any other connections in your Routing table, you could be looking at a millions of attempts. So this guy doesn't hold the state of those connect requests. Importantly it doesn't hold the state, and that's fatal. Because that state could be millions, and you could do nothing but the [??], but if somebody doesn't connect to you, what do you do? Beg them? You know, there's no point in holding that state.
  8.  
  9. So we saved all the state away here, we say, "I'm ID 1, here's the connection parameters that I've got." (I might have several connection types. I'm trying to connect to you in TCP.C, or UTP.) This goes here, and the ID 1 node says, "OK I've got that." It's saying, "I'm going to send back my connection stuff, here, to this guy." And this guy says, "Oh! ID 1 wants to connect to me. The connect responds... which means, I must have asked him to connect!" (But how do we know that's not a hacker? Somebody could be just be sending a connect request and doing something bizarre; we don't know.) So when the connect request... when the connect request comes back, and says "connect response," the original connect request signed... by you, by this, this Node here, Node 2...---he'll have, uh... so he gets his own parameters back, plus his own signature back, saying, "This is what you asked me!" (And here, you've signed it yourself, so you can easily check it.) "And here's how you can connect to me." So it's saying, "Here's my connection parameters, here's your connection parameters. Let's connect!" When that connection then gets established, this guy here then moves up into the Routing. So he becomes on the Routing network Node, and he can speak for himself.
  10.  
  11. So initially... when you're not on the Routing network, you have to relay through another Node, who's on the Routing network. And, once you've got your connection established, you appear on the Routing network again. So you can speak to the Routing Network.
  12.  
  13. So, on Routing, that's how we do a connect, and that's how we get on to the Routing network, from the excellent work that Crust does, to get us onto the IP. He needs to get us onto the IP Network, so he needs to connect us to an IP Address that's already on the Routing network, behind the IP Layer. So Crust does that part for us, and we just use him to go onto the... other network.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement