The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Derek Fawcus <dfawcus+lists-tuhs@employees.org>
To: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: [TUHS] HTTP (was Re: Re: Research Datakit notes)
Date: Tue, 28 Jun 2022 23:45:18 +0100	[thread overview]
Message-ID: <YruEfkCDAM0XJu1F@clarinet.employees.org> (raw)
In-Reply-To: <76DD5063-3817-4550-980A-66E728DFD634@gmail.com>

On Tue, Jun 28, 2022 at 10:05:26AM -0700, Adam Thornton wrote:
> 
> And I think we already have the answer about what the abstraction is, albeit at an application rather than the kernel level.
> 
> To answer Rob's question: I think the abstraction is now much farther up the stack.  To a pretty good first approximation, almost all applications simply definte their own semantics on top of HTTP(S) (OK, OK, Websockets muddy the waters again) and three-to-five verbs.  There's an incantation to establish a circuit (or a "session" if you're under the age of 50, I guess), and then you GET, DELETE, and at least one of PUT/POST/PATCH, for "read", "unlink", and "write".  This does seem to be a more record-oriented (kids these days get snippy if you call them "records" rather than "objects" but w/e) format than a stream of bytes (or at least you put an abstraction layer in between your records and the stream-of-octets that's happening).

Yes it is effectively records, or RPCs w/o state between requests.  So akin to DNS queries over UDP, rather than DNS queries over TCP.

As the whole HTTP model allows for proxies, at which point the request (GET, HEAD, POST, etc) includes
an endpoint address (DNS name and port) and path at that endpoint.  Having 'session' state is built at
a level above HTTP, by cookies or redirecting to magic URIs encoding the session ID after the query (the '?').

The fact that this all happens to run over a TCP connection, simply means that we have stacked sets of
VCs.  An application VC on top of a connectionless HTTP on top of a TCP 'VC'.  One could argue that
Websockets simplifies this by ripping out the HTTP layer, and having the top VC then just being message
framing within the TCP session.

(Ignoring for the moment TLS on top of TCP, or HTTP/3 being on top of QUIC, hence UDP)

> This is certainly not efficient at a wire protocol level, but it's a fairly small cognitive burden for people who just want to write applications that communicate with each other.

Sort of, in that I recently investigated the Go HTTP client/server APIs as someone was asking us about 
implementing a MiTM HTTP(S) "firewall".  Depending upon how one deals with it, it hides the VCs and exposes
the connectionless RPCs.

With such a MiTM in place, the 'nice' RPC in a session is effectivly forced back to the 'nasty' RPC in datagrams, even though the endpoints may be unaware, but they already include the whole datagram remote address in the request.  Responses come back by 'magic' without explicit address.

So maybe from that perspective one could model HTTP request/response as RPCs over SVCs, those being raised and torn down for each exchange.

DF

  parent reply	other threads:[~2022-06-28 22:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-25 23:01 [TUHS] Research Datakit notes Paul Ruizendaal
2022-06-25 23:09 ` [TUHS] " Larry McVoy
2022-06-25 23:57   ` Rob Pike
2022-06-26  1:17     ` Paul Ruizendaal
2022-07-02  2:51       ` Grant Taylor via TUHS
2022-07-02  2:57         ` Larry McVoy
2022-06-28 10:38     ` Derek Fawcus
2022-06-28 12:36       ` Rob Pike
2022-06-28 12:45         ` Rob Pike
2022-06-28 13:33           ` Dan Cross
2022-06-28 21:19             ` Lawrence Stewart
2022-06-28 21:34               ` Richard Salz
2022-06-29  6:07                 ` Stuart Remphrey
2022-06-28 16:11           ` Tom Teixeira
2022-06-28 18:28           ` John Floren
2022-06-28 12:47         ` Rich Morin
2022-06-28 13:13           ` Marc Donner
2022-06-28 14:41             ` Clem Cole
2022-06-28 15:54               ` Tom Teixeira
2022-06-28 17:05             ` Adam Thornton
2022-06-28 17:43               ` John Labovitz
2022-06-28 22:45               ` Derek Fawcus [this message]
2022-06-26  1:41 ` Anthony Martin
2022-06-26  9:52   ` Ralph Corderoy
2022-06-26 11:04   ` Paul Ruizendaal
2022-06-29 20:21   ` Paul Ruizendaal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YruEfkCDAM0XJu1F@clarinet.employees.org \
    --to=dfawcus+lists-tuhs@employees.org \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).