"term with limit of 1KB or 256b or sth" is the minimum yupI'm guessing the reason this came up is splitting nacks across multiple packets doesn't work? And would require some kind of ack-the-ack bootstrapping for correctness. If you could just stuff an arbitrarily large noun into a UDP socket natively, presumably /ames/ wouldn't need to care about MTU either?(I guess one option here is the Out Of Band thing of sending a "true nack" packet with the term, and then following up with a large "forward" packet with all the details that didn't fit, which the receiver waits on for a bit and then just truncates the nack to term-only; this gets super messy however)
> I'm guessing the reason this came up is splitting nacks across multiple packets doesn't work?That's correct. Ted is working on some improvements to Ames and we realized this stuff was never properly thought through. Ted's writing up our proposal, but it's similar to your out-of-band proposal. The old system acked acks if you weren't careful, and all nacks were a space leak because you needed to keep them around forever. Ted's proposal solves both of those in what I think is fairly clean way.
On Wed, May 08, 2019 at 3:39 PM, Anton Dyudin <antec...@gmail.com> wrote:
"term with limit of 1KB or 256b or sth" is the minimum yupI'm guessing the reason this came up is splitting nacks across multiple packets doesn't work? And would require some kind of ack-the-ack bootstrapping for correctness. If you could just stuff an arbitrarily large noun into a UDP socket natively, presumably /ames/ wouldn't need to care about MTU either?(I guess one option here is the Out Of Band thing of sending a "true nack" packet with the term, and then following up with a large "forward" packet with all the details that didn't fit, which the receiver waits on for a bit and then just truncates the nack to term-only; this gets super messy however)
--
You received this message because you are subscribed to the Google Groups "urbit-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@urbit.org.
To unsubscribe from this group and stop receiving emails from it, send an email to d...@urbit.org.
Different networking protocols make different tradeoffs to achieve different properties. Ames is all the way on the reliability end of the spectrum, whereas a video streaming protocol would optimize for latency. TCP is closer to the Ames side of things, but Ames takes the guarantees even further by encrypting and signing packets and providing exactly-once messaging by requiring permanently persisted sequence numbers. Another way to think of this is that Ames improves upon the guarantees of TCP by making them permanent instead of scoped to a (temporary) connection.Ames isn't well-suited to streaming video or other low-latency applications, for much the same reasons TCP isn't great for that. Ames is probably a bit worse than TCP because of our transactionality, which requires a disk write before acking.It would be cool to see a Azimuth-based low-latency streaming protocol. It would be cool if that protocol could take advantage of Ames' decentralized routing. Maybe it could even upgrade from Ames, similar to how a websocket "upgrades" from an HTTP connection. One way to start would be to take the Ames packet header and set one of the three unused bits to indicate it's a different protocol. Then Ames and the streaming protocol could share a UDP port.The other option would be to use an off-the-shelf streaming protocol and just use the routing and authentication information from Ames. Plenty of room for different approaches here.—~rovnys-ricfer
--
To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@urbit.org.
Perhaps we've done a poor job of explaining our proposal, because I think what we're proposing is basically the same thing except we require this diagnostic information and therefore block on it. I may have overemphasized how the naxplanation flow is "not a flow". It uses the exact same machinery as flows and is implemented on top of flows. It just has its own flow for communicating this "diagnostic information"/"naxplanation". When I say it's "not a flow" I just mean it uses a subset of its functionality (eg we shouldn't ever give a nack to a diagnostic data message, we shouldn't let userspace send a message on this flow, etc).As for why you want this information to be required:- If you don't require this information, you make it impossible to properly implement the protocol without introducing a potential space leak (or throwing away all diagnostic data, or having diagnostic data be inconsistently available). You also have to think through two cases: whether or not they request the diagnostic data. Cyclomatic complexity is bad!- You need to block on this information because you want to provide this information to the calling vane. And you can't give to the calling vane a positive ack to message n+1 before a negative ack to message n, or else you've violated the fundamental ordering guarantees of a flow.
I think requiring it significantly simplifies the model.
On Fri, Jun 14, 2019, 17:45 Joe Bryan <joe@tlon.io> wrote:
I've done a poor job explaining my proposal. Sorry about that! Let me try again:I'm specifically suggesting that nacksplanations *not* be nacks, but simply be diagnostic information sent over another flow. This flow would be a normal ames flow, with the usual semantics around ordering, acknowledgements, etc. The current nacksplanation proposal has the downside of requiring ames to support two different kinds of flows, with different semantics for each. I'm claiming that we can have one flow type, with straightforward semantics, and just layer a diagnostic channel over the top. This diagnostic would support arbitrary sized nacksplanation messages (as normal, fragmented, acknowledged ames messages), providing additional context for nacks and plugging the nack space leak without formal, blocking cross-talk between flows.The downsides are that the nack space leak would still be formally present and practically possible (if our peer's ames implementation does not in fact request nacksplanations), and that the end to end performance of delivering fully-contextualized negative-acknowledgements to end-applications would be worse. But the upsides are a much simpler conceptual model, and, I believe, a much simpler implementation.
On Fri, Jun 14, 2019 at 2:00 PM Ted Blackman <ted@tlon.io> wrote:
Oh, there is a complication there: we'd need to have a separate packet pump for each naxplanation flow, so they would really be separate flows in some sense. There'd be cross-talk between a normal flow and its naxplanation flow, but not among normal flows.
To unsubscribe from this group and stop receiving emails from it, send an email to dev+unsubscribe@urbit.org.
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote m_-6984788387074050469gmail-m_2903714908164242293m_-4887240938165550617gmail-m_4417555230222024556m_-346483829874182476m_1956485342146697230gmail-m_-1204485662685887324sh-color-black m_-6984788387074050469gmail-m_2903714908164242293m_-4887240938165550617gmail-m_4417555230222024556m_-346483829874182476m_1956485342146697230gmail-m_-12044856
> Philip, I'm curious about your thoughts on having one naxplanation flow per normal flow to prevent normal flows from blocking each other due to nacking.
Conceptually, I think you're right that's cleaner. The oob message really is per flow.Usually in pubsub you want both sides to be able to cancel a subscription. In fact, an intermediary often can cancel it as well.The problem with throwing away flow state and reusing flow numbers is you need to know how to respond to packets that got stuck in the proverbial Singapore and may arrive minutes or hours later. So, you can't reuse flow numbers unless you include a separate nonce per iteration of the flow - but at that point you may as well just get a new flow number.If you view "closing a flow" as an explicit acknowledgment that they've received all the acknowledgments for all the packets they've sent on that flow, then you can safely throw away all flow state. If you later receive a packet on that flow (ie a flow < greatest flow number but with no flow state), you can safely drop it. This doesn't truly kill the flow since it can't be reused, it just marks it with an implicit tombstone that it's useless now. We haven't properly explored the implications of ending a flow, and I'd rather not do so because it's a whole mess of special cases. Anything that deals with flows has to handle the possibility that the flow might not exist.Formally, of course, the nack packet isn't strictly required. You could just send fragment acks and positive message acks in-band and naxplanations out of band. A naxplanation implies a negative message ack. In practice, I think this would screw up naive congestion control, and it would unnecessarily complicate the receiver logic by inverting the layers: the naxplainer layer would trigger actions at the packet layer, which is upside down.
Once more into the bikeshed ...
I think %echo for acknowledgements is misleading. I propose %aver.
And I think it's worth considering that %pull/%push are really just synonyms for remote %pass/%give. I'm tempted to say we should just therefore just use %pass and %give in the local sending vane. Of course, then we'd have lots of [*duct %pass %a %pass ...] and [*duct %give %give ...], which is not exactly the ideal aesthetic.
Another thought: do we need different tags for sending on flows of opposite polarity? We could have a single "send a message" card, %pass'ing it to a "forward flow" and %give'ing it on a "backwards flow". In this case, I'd be tempted to keep using %want (ie, [*duct %pass %a %want ...] and [*duct %give %want ...]).
--------------
For context, here's the interface to old (current) ames (which doesn't not have directional flows):
Send a message:
local vane -> %want -> local ames -> message -> remote ames -> %west -> remote vane
Acknowledge a message
local vane -> %mack -> local ames -> ack-message -> remote ames -> %woot -> remote vane
I don't think we could ever receive the naxplanation for n+1 before the naxplanation for n. Messages have to be received in order, and the nacker will enqueue naxplanation n to be sent before naxplanation n+1, because it tried to process n first.
On Tue, Jun 18 2019 at 2:04 PM, Ted Blackman <ted@tlon.io> wrote:
On Tue, Jun 18 2019 at 1:59 PM, Ted Blackman <ted@tlon.io> wrote:
I'm fine with %aver. I don't want to use %give and %pass because it would violate our general rule of not reusing tags in different parts of the system. This would be especially bad here given that the two uses are so close to each other.It might be fine to have the same tag for both forward and backward flows. I think %want is misleading in that case, though.Candidates:%mess%memo%post%word%news%chat%heed%page%gist%pith%beep%chit%spamI'm leaning toward %word. Whatever it is, it should feel good symmetrically as either a request or a subscription update.
Ah, I hadn't thought of that... but yes, sounds legit. Naxplanations do all come in order, so if we get one on n+1, then we know the remote has positively acked everything from the last naxplanation we've processed through n.
Urbit's official motto has been "never ack an ack", but perhaps we should change it to "don't ever ack an ack, but it's okay to ack a nack as long as you never nack a nack".
That's got a nice ring to it. Also, never naxplain a naxplanation.The management has informed me that the word "naxplanation" is "far too silly", which is obviously true. While we're bikeshedding, let's take suggestions on replacements.Candidates:nack-trace... any others?