Http Stream VS. Http Transaction
Before H2 , The http doest not has any concept about stream. So we the Transaction is interpreted as a Stream. But now we have h2 and h3, It would be better to introduce an abstraction of Stream to implement the H2Stream and H3Stream to replace Transaction.
Having a common stream class for H2 stream and H3 stream would make some sense, however, I don't think it would be something that replaces Transaction.
From my understanding, Transaction is a representation of a series of processes from an HTTP request to an HTTP response, and it's for HttpSM. It would never be changed unless HTTP semantics changes. On the other hand, Stream is a concept for multiplexing on H2 (and H3). Each stream transfer one HTTP transaction so far, but it might be changed. H4 might do pipelining on a stream. Even if it happened, there would still be transactions.
cc @a-canary
Transaction is a representation of a series of processes from an HTTP request to an HTTP response, and it's for HttpSM.
Actually not it is what HttpSM does. Transaction is a connection (I mean connection not tcp connection) between client_vc and SM.
Why not rename the Transaction to Stream. And bind the Stream with HttpSM. I think it would be clearer than Transaction.
Well, Transaction works like a pipe and you can call it stream, but isn't it an attribute as a VConnection in ATS world? If you call it Stream, it would be confusing because "stream" is used for a different concept on H2, H3 and QUIC.
Transaction also have an attribute as a unit of HTTP messaging, starts with a request and ends with a response. This is the name came from, I think. Node.js is designed with the same concept. https://nodejs.org/es/docs/guides/anatomy-of-an-http-transaction/
Thanks for your response . I am clear now. I am ok with Transaction.
The reason I want to change it to stream because I wants to combine H2 H3 H1 header as one. IIUC, current h2 code has to print the parsed header literal to the buffer and parse it again in Http1 logic.

See here. if we can embed some info into Stream or Transaction. Then different decoder/encoder can process different header and combine it as one structure. So we don't need to print header into buffer or format h1 header into h2 format.
Sounds good to me. I'm still not sure what you mean by "change it to stream", but I agree to having an abstraction layer or interface that enables to handle HTTP transaction without taking care of differences among versions.
For example, HTTP headers have to be read regardless of its version. It is encoded and encapsulated only on H2 and H3, but by handling H1 headers like "encoded as plaintext and encapsulated into nothing", HttpSM (or HTTP semantics processor) can just say "Give me headers!" or "Read headers from this byte stream!" to the abstraction layer.
It's slightly different from #5488 but this is definitely one of things that we should discuss for the refactoring.
Great. close it since duplicate.
Yes, we should try to add common interface API like "parse_headers", to the ProxyTransaction class and have separate implementation for H1/H2/H3. IMO this falls under #5488.
And Yes I have to remind myself daily that Http2Stream is roughly equivalent to Http1Transaction.