dedbox
2017-11-20 22:44:53

@notjack good luck on the docker stuff


dedbox
2017-11-20 22:45:45

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


dedbox
2017-11-20 22:50:52

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


dedbox
2017-11-20 22:51:15

RFC 3986 does not use it


dedbox
2017-11-20 23:00:01

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?


notjack
2017-11-20 23:04:43

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


notjack
2017-11-20 23:05:35

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


dedbox
2017-11-20 23:10:48

Ok, thanks.


dedbox
2017-11-20 23:11:04

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?


notjack
2017-11-20 23:12:01

the idea is that:

  1. the authority defines who you’re talking to
  2. the scheme defines how you talk to them
  3. the path and query define what resource you’re talking to them about

notjack
2017-11-20 23:21:23

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.


dedbox
2017-11-21 00:46:43

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


notjack
2017-11-21 00:49:26

sort of, ya


notjack
2017-11-21 00:50:05

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


notjack
2017-11-21 00:51:16

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?


dedbox
2017-11-21 01:05:35

ok


dedbox
2017-11-21 01:08:27

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.


dedbox
2017-11-21 01:10:24

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


dedbox
2017-11-21 01:11:41

The top layer would be protocol-specific APIs.


dedbox
2017-11-21 01:13:49

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


notjack
2017-11-21 01:16:03

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


notjack
2017-11-21 01:16:21

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


notjack
2017-11-21 01:16:35

since that would be handled at the “connector” layer


dedbox
2017-11-21 01:19:59

ok. I’ll keep probing the design.


notjack
2017-11-21 01:20:38

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?


dedbox
2017-11-21 01:22:30

if it can be done, I can figure it out


notjack
2017-11-21 01:22:54

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


notjack
2017-11-21 01:23:03

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


dedbox
2017-11-21 01:23:19

oh yeah, I know redex well enough


dedbox
2017-11-21 01:24:26

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


dedbox
2017-11-21 01:26:21

Will scribble let me embed equations?


notjack
2017-11-21 01:28:44

I think scribble lets you embed Redex models “automagically”


notjack
2017-11-21 01:29:04

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


dedbox
2017-11-21 02:23:12

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