-
Notifications
You must be signed in to change notification settings - Fork 11
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
Provide a nice record type #10
Comments
Note: this is now about exposing a type to use elsewhere. I'd like to rename However, this is kind of a low priority. |
It looks like the same protobuf message is used on the wire, and in storage. But the extra field Ideally I think we would want this:
But I think this causes a binary incompatibility with existing data stores. An alternate that should be binary compatible would be to fork Record:
|
Really, we can go either way. The former is more complex because we'd need to get the JS team to agree and then we'd need to create a datastore migration but I won't object if you want to put in the work. I'm not sure about the utility of the latter. It's not really removing the hack, just kind of hiding it under the covers. But I could be convinced. |
@vasco-santos which of these options would suit the JS implementation? I notice https://github.com/libp2p/js-libp2p-record/blob/master/src/record.proto.js which appears to duplicate the protobuf definition in this repo. Would it be better that all implementations share a mutual proto definition for the record sent over the wire? The same would go for the datastore, if that's intended to be compatible between implementations (it doesn't appear so?). Even if the first isn't worthwhile, the second option (splitting the record) will still act as some type-enforcement that the 2 records should not be interchangeable. I'm not of the most appropriate place to discuss this. |
If we're not really touching the spec, here is probably fine. Note: if you need to get someone's attention, IRC is probably the place to go. |
Motivation:
The text was updated successfully, but these errors were encountered: