kentonv changed the topic of #sandstorm to: Welcome to #sandstorm: home of all things sandstorm.io. Say hi! | Have a question but no one is here? Try asking in the discussion group: https://groups.google.com/group/sandstorm-dev
frigginglorious1 has joined #sandstorm
frigginglorious has quit [Ping timeout: 264 seconds]
frigginglorious1 is now known as frigginglorious
frigginglorious has quit [Read error: Connection reset by peer]
dwrensha has joined #sandstorm
<dwrensha> I'm trying to understand how Vat Networks with more than two parties will work. What happens if Alice tries to connect to Bob at the same time that Bob tries to connect to Alice? Which connection wins?
Mitar has quit [Ping timeout: 256 seconds]
Mitar has joined #sandstorm
<isd> Hm, good question. Don't know the answer, but observation: I don't think it actually breaks anything to have two connections open, with the client side being "anonymous." Though it's definitely weird.
<dwrensha> hm, yeah, maybe it's not a problem to have multiple connections open between a given pair of vats
<isd> Probably that needs to be resolved at the VatNetwork level? whether that's even meaningful depends on tcp-like semantics; One could imagine a UDP based transport where vatIds are (host, port, pubkey), with connection setup layered on top in such a way that those two connections just "agree."
<dwrensha> when you want to Accept a new capability from another vat, you can choose any of your open connections to that vat
<isd> right.
<isd> And I think even with transports where this comes up, it's bounded to two connections per peer, so maybe not a big deal?
<abliss> woudln't the only agree if each vat uses a locally-specfiied outgoing port number identical to the port number it listens on? limiting it to one connection at a time generally?
<abliss> i suppose both sides could compute both port numbers deterministically by hashing the two hostnames in alphabetical order. but specifying the source port won't work well with NATs?
<isd> UDP doesn't have connections as a concept. You can receive a packet, say "who is this from?" and act on it accordingly
<isd> I mean, if you want NAT traversal you have a whole bunch of other issues.
<abliss> oh, i guess UDP allows a source port of 0, so you could just include in the payload the return port number where you expect to receive responses
<isd> (I kinda want a webrtc vatnetwork)
griff_ has quit [Quit: griff_]