Skip to content
This repository has been archived by the owner on Sep 13, 2018. It is now read-only.

Clarify In/Out terminology #64

Closed
alexcrichton opened this issue Oct 7, 2016 · 8 comments
Closed

Clarify In/Out terminology #64

alexcrichton opened this issue Oct 7, 2016 · 8 comments
Milestone

Comments

@alexcrichton
Copy link
Contributor

Commented here: #62 (comment)

I personally interpret in/out with one of two interpretations:

  • Read out a request, write in a response.
  • Read in a request, write out a response.

Unfortunately these mean opposite things :(. Looks like this is standard terminology in finagle though? (cc #62 (comment)). Maybe I should just shift how I view these?

(may also be worth exploring alternative names)

@seanmonstar
Copy link
Member

FWIW, in hyper I have the concept of Incoming vs Outgoing. This distinction appears in other HTTP libraries that I've looked at. This causes a very odd-looking case:

impl<T> FramedIo for Conn<T> {
    type In = T::Outgoing;
    type Out = T::Incoming;
    // ...
}

@carllerche
Copy link
Member

In my terminology, In = message going into the socket, Out = "message coming out of the socket"

What is incoming / outgoing in your case?

@seanmonstar
Copy link
Member

Incoming = message incoming to this machine, Outgoing = message going out from this machine.

@alexcrichton alexcrichton added this to the 0.2 release milestone Oct 24, 2016
@tikue
Copy link

tikue commented Nov 12, 2016

This is confusing every time for me. I don't think inverting the in/out cases would make it any more intuitive.

@aajtodd
Copy link
Contributor

aajtodd commented Nov 15, 2016

Usually seen as the second choice: Read in a request, write out a response. I think it would be very confusing the other way around.

This matches Finagle Service definitions Finagle Services as well as Wangle (and pretty much any socket library I've worked with for what it's worth).

What I don't see or haven't wrapped my head around is the filters part of Framing for tokio. I know I've gone back and forth with @carllerche on this in #63 and gitter but embedding the types that way seems rather limiting and requires lots of boilerplate and manual plumbing.

@carllerche
Copy link
Member

There is no more In / Out.

@tikue
Copy link

tikue commented Dec 21, 2016

There is in Codec. Is it worth reopening this in tokio-core, or is it less ambiguous in that usage?

@alexcrichton
Copy link
Contributor Author

@tikue sure yeah, I've opened one: tokio-rs/tokio-core#135

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants