HYDIN is a set of standards that allow users to publish hyperlinked documents.
It builds on the ideas of the World Wide Web and a few ideas the Web and from older protocols that were forfotten and ignored.
The HYDIN protocol is like:
- HTTP: Similar set of methods and header syntax.
- Gopher: it supports machine-readable resource maps.
- The old shared hosting with tildes but better: protocol address (for connecting) and HYDIN location are separate concepts.
The HYDIN markup language is like:
- HTML: similar syntax with tags.
- XHTML: extensible with custom elements.
HYDIN browsers can delegate handling of custom elements to plugins, a bit like web components, but the user can decide what plugin to install and use by default.
HYDIN addresses consist of a location part and a document path part, separated by a colon.
Location part generally starts with a hostname or address of a HYDIN server.
<SERVER>[/<LOCATION>]:/<DOCUMENT>
example.edu:/departments/cs/faculty/jrandomhacker/projects/megalisp
(Document /departments/cs/faculty/jrandomhacker/projects/megalisp
on server example.edu)
192.0.2.45:/test/page
(Document /test/page
on server 192.0.2.45)
A server address MAY be followed by a location path, to indicate a sub-location on a server.
HYDIN servers may host multiple independent sites. In this case sites can be separated by a "location path" (this is distinct from a document path that is placed after the colon).
example.edu/users/jrandomhacker:/projects/megalisp
(Document /projects/megalisp
of the site /users/jrandomhacker
on server example.edu)
Foreign protocol address is placed in square brackets, in place of the location part.
Degenerate foreign transport: HYDIN listening on a non-standard port: [example.net:9090]:/about
HYDIN over HTTP: [http://example.net/~jrandomhacker]:/projects/megalisp
Foreign protocol addresses may contain nested square brackets. This is required for IPv6 addresses, so this monstrosity is, sadly, valid—it has to be:
[http://[2001:db8::1]:9090]:/about
- GET (retrieves a document)
- LIST (lists all child nodes under a path)
- MAP (retrieves a machine-readable map of a path)
- INFO (retrieves resource information)
The GET method retrieves a document.
LIST /projects
["megalisp"]
MAP /
{"projects": [
{"megalisp": ["about", "downloads", "docs"]}
]
}
INFO /
Description: jrandomhacker's website
Contact: J. Random Hacker <jrandomhacker@example.net>
INFO /files/cat.png
Type: image/png
Size: 45k