
@notjack good luck on the docker stuff

I’m trying to understand what URIs are in net2
and how they work

The roadmap uses the term “URL authority.” Can we define the term precisely?

RFC 3986 does not use it

There are some URI parsers in the racket library, but they all seem to have quirks that might get in the way. For example, net/uri-codec prints and parses URI components, and net/url has vague limitations like “the only supported protocols are http, https, and sometime file.” Is there already a net2
-friendly URI-munging library?

There is not, I’m intending for net2
to implement well-defined and spec-adherent URI munging

the term “URI authority” is defined in section 3.2 of RFC 3986, but it just calls it “authority” since the entire doc is in the context of defining URIs

Ok, thanks.

So far, net2
restricts URIs to just scheme and authority components (no path), which makes sense because that’s the info needed to construct transports. What are the use cases for URIs with non-empty paths?

the idea is that:
- the authority defines who you’re talking to
- the scheme defines how you talk to them
- the path and query define what resource you’re talking to them about

This means one network party can provide multiple resources without hiding that fact from clients. You can statically know that the <http://example.com/foo>
resource and the <http://example.com/bar>
resource can both be retrieved over the same network connection. You can also whitelist what parties some party communicates with by checking only the authority component, and you don’t have to know ahead of time how to whitelist every single resource each of those parties hosts.

So there’s a dispatching abstraction that maps logical transport operations onto physical connections?

sort of, ya

It’s more like the spec for URLs explicitly ensures URLs contain enough information that it’s possible to have a dispatching abstraction like that

imagine if all website pages had ids that were just opaque numbers - a browser could never reuse connections without custom code based on the specific website being talked to, because how is the browser supposed to know that Resource 12854783587 and Resource 89238765358972 are hosted by the same server?

ok

So far, I’ve modeled the low-level API Racket exposes. It’s like an “assembly language” for net2
: listen, connect, accept, send, receive, release.

Building from the bottom up, I guess the next layers of abstraction would be a bidirectional URL-connection map, then connection pooling.

The top layer would be protocol-specific APIs.

Somewhere in between, there’s URIs, buffering, pipelining, and probably some other generic functionality

That sounds right. I’ve got revised connector docs half written - my goal is to get those pushed this week

the revised docs include a description of how generic connection pooling works

since that would be handled at the “connector” layer

ok. I’ll keep probing the design.

you wouldn’t happen to be able to make your model with pict / scribble in a way where it could be embedded in the package docs, would you?

if it can be done, I can figure it out

If you know how to use Redex that might make it “easy” to do that for formal models

but I’ve never used it so I have no idea how that would look

oh yeah, I know redex well enough

LaTeX is my go-to for math and diagram coding, but I’d drop it in a second for a more modern alternative

Will scribble let me embed equations?

I think scribble lets you embed Redex models “automagically”

If not, there’s a scribble package for math equations

Nice, I found “scribble + LaTeX utils” which supports mathpar for inference rules. Should be able to reproduce all the math bits with that.