Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisiting the tree serialization #9

Open
chrysn opened this issue Oct 12, 2021 · 0 comments
Open

Revisiting the tree serialization #9

chrysn opened this issue Oct 12, 2021 · 0 comments

Comments

@chrysn
Copy link
Member

chrysn commented Oct 12, 2021

So far, we've always worked with CoRAL as a tree-ish CBOR thing. That's very convenient to write on paper, and works reasonably well with CBOR, but it brings with it two tricky points:

The latter can be optimized out (the consumer sees the number of entries in the array and can discard contexts and base URIs that can never be come back to), but given that optimization was never brought up AFAIR, I don't think it would be widely implemented.

If we, in the information model, forbade that, once a resource is reached that's already in the "stack", no more statements can be made about that resource any more, things might get a lot easier. Example:

[[2, 4711, cri'http://example.com', [
    [2, 4223, cri'http://example.com/page', [
        [2, 0815, cri'http://example.com' / here we *could* right now say more about example.com, /
                                          / but that may not be a good idea, just say it up there /]
    ]]
]]]

The two upsides of doing this would be:

  • The structured information model can (probably, gotta take some more time to confirm) just be an ordered list with duplicates of edges.
  • We might find out that it's more compact and easier to implement to use such a flat structure also for serialization.

The two downsides are:

  • It's a big change and I don't know if the outcome is pretty.
  • If there is confusion about the root node's identity ("Have you ever set up a WebDAV server behind a reverse proxy?"), the constraint may be violated. It's not as bad as it sounds -- the basic information content will still be the same, but the structured content will differ subtly. Worst about this aspect is probably that we'd need to keep consumers from screaming "fault" if they find this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant