-
Notifications
You must be signed in to change notification settings - Fork 16
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
Splitting Braid Patch into Range Patch and Synchronization Types #20
Conversation
@toomim I have finished a pass on the Synchronization Types spec. Now moving to the range patch one. |
Done. First pass over the split done. Please review. I might not have time anymore in the following days to look into this, so feel free to use it in whichever way you want (merge it, not merge it, change it completely). |
FYI, braid http spec might require updates related to what this PR is changing, but I have left that out on purpose so that we first finalize these two. |
I am currently still working on adding The +patch Structured Syntax Suffix section. |
Pushed and finished another iteration. Feedback welcome. Feel free to merge if you accept things. |
I defined the new range unit as If you have ideas for other range units we might want to add, we can add them as well. (Or you can add them, just follow the template I made. Of course, I have no idea if it is correct template.) |
and integrity protection services, or which is designed for use | ||
only within a secure environment. Types SHOULD always document | ||
whether or not they need such services in their security | ||
considerations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the idea here is that some patches might have built-in hash-chain (like git) to previous versions. So it is easier to detect tampering. While some patches might be stand-alone. So in the former cases a synchronization type might detect that something is off. But in the later it would need additional things like signatures and stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should be part of the synchronization type. I think the synchronization type only needs to be there in order for two synchronizers to consistently resolve to the same state — that just means that they need to use the same function to merge multiple parent versions into a single resulting state.
So a synchronization type doesn't need to be more than a function merge (parent_versions) => state_of_child_version. This doesn't need to care about whether the version dag is merkle; whether it is hashes; it doesn't need to validate. The version identifiers can be determined by something separate, and validation can be a separate process and separate specification.
Overall, I think that this can make the actual Synchronizer-Type a lot more specific, which also reduces the potential security problems, and as a result, I think a lot of the security considerations don't need to be in there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll be giving feedback on one file at a time.
Feedback for Range-Patch
Good work! I like this a lot overall. There's great symmetry here. These are my concerns:
- I think this should work for PUT in addition to PATCH, because PATCH isn't idempotent.
- I know that a PATCH seems more specific than a PUT, but if GET+range can grab a subset of a resource, I think that PUT+range should be able to put a subset of a resource.
- But perhaps this isn't important enough to care about right now.
- I think we need the server to advertise that it accepts patches of a range
- multipart/byteranges is just for byteranges. I think we need a new type multipart/ranges, that can be any range, where the range is specified internally.
- I prefer separating the multiple parts via a content-length rather than separator string, but perhaps we don't need to prioritize this yet
- I don't understand why we are specifying the stand-alone patch format here
- JSON range also needs to be able to handle slices.
The part about a server advertising that it accepts ranges is relevant to the Server MUST NOT ignore the Range header field when used with a PATCH request.
part. I think this only should be necessary if a server supports the Range header. In which case the client needs to know whether or not it supports it, which I think we could determine with some sort of Accepts header.
I disagree that the
Of course, but that is already standardized by So we have to find some other way to communicate in Braid HTTP spec that the server is Braid compatible, if this is what you want. Maybe through extending
See here:
Because we can and we will need it for the Braid HTTP spec.
Will add that.
So making |
Pushed improvements for few issues you raised. I will work on JSON range for slices later tonight. |
I think I just addressed all issues you raised. |
I'm still reading and thinking about this, but clearly this should be merged already. I'm sorry for leaving it open for so long. |
Review of Synchronization Types
|
Fixes #10 and fixes #6 and fixes #7 and fixes #4.