4 ms·
Don't try to parse things without a standard. Even CSV and e-mail addresses are more complicated than they seem. Also, it's pretty silly that we still use thes
by peterwwillis 8y ago
Don't try to parse things without a standard. Even CSV and e-mail addresses are more complicated than they seem.
Also, it's pretty silly that we still use these unintuitive conventions from 40 years ago for modern systems. Is 192.168.2.8:10443 an address? A phone number and extension? Is it TCP, UDP? IPv4, IPv6? An HTTPS service, or just something resembling its decimal notation assigned service number? Are there multiple services proxied behind this one address? Can I route between them? When I request a URI, does the application know what I really want/expect? What about a timeout for my request? What about authentication/authorization? Consistency requirements? Idempotence? Security guarantees?
Operating systems don't even take <host>:<port> arguments for network syscalls, that's just a convention we sort of came up with and later stuck to. But as a URL it's pretty crap. I suggest we replace them with modern URLs that can embed tiered information such as session IDs, service types, routes, security requirements, operational parameters, etc. Most people may only need https://google.com/ https://google.com/, but sometimes we may also want to request webv2+uquic+v6:/SC,TLSv1.3/userid[s:84742049]@google.com(r:NA)/ . I know that's ugly as sin, but hopefully people wouldn't need to specify all of that all of the time (service name/version, transport, address, strong consistency, TLS 1.3, userid, session id, host/namespace, North American region).
- progval 8y agoThis is the problem that multiaddr tries to solve. Unfortunately, it's still very much underspecified and incomplete (eg. it does not support domain names). https://github.com/multiformats/multiaddr https://github.com/multiformats/multiaddr
- tedunangst 8y agoWhy bother with text when ASN.1 solves all these problems too?
- mcguire 8y agoBut then you have to solve ASN.1's problems. Some of such, circa 2000: https://tools.ietf.org/html/draft-yu-asn1-pitfalls-00 https://tools.ietf.org/html/draft-yu-asn1-pitfalls-00 Holy mother of cows! The specs are available! https://www.itu.int/en/ITU-T/asn1/Pages/introduction.aspx https://www.itu.int/en/ITU-T/asn1/Pages/introduction.aspx
- jandrese 8y agoDid you forget the /s tag on the end of that post?
- romeisendcoming 8y agoThis type of feature-itis -webv2+uquic+v6:/SC,TLSv1.3/userid[s:84742049]@google.com(r:NA)/- is exactly the reason google is going to hell.
- nly 8y agoA workable solution would have been to promote the "[address]:port" representation for both IPv4 and IPv6 after IPv6 was introduced. Then we'd have a universal way to represent UDP and TCP endpoints. It's kind of mental that my browser will accept https://1.1 https://1.1 today but not https://[1.0.0.1] https://[1.0.0.1]