wirelineio / wireline-core

GNU Affero General Public License v3.0
1 stars 1 forks source link

Use protobuf encoder/decoder for hypercores. #61

Open ashwinphatak opened 4 years ago

ashwinphatak commented 4 years ago

Open questions:

ashwinphatak commented 4 years ago

Encoding/decoding uses protobuf namespaced message type names (e.g. chess.Game). How does this tie ino https://github.com/wirelineio/wireline-core/issues/56?

richburdon commented 4 years ago

Protobufs must be registered with WNS

Look at proto extension registry for background: https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/ExtensionRegistry But this requires coordination: https://github.com/protocolbuffers/protobuf/blob/master/docs/options.md AND https://github.com/multiformats/multicodec/blob/master/table.csv

ashwinphatak commented 4 years ago

Notes from call:

Internally, in AnyType, don't use WRN (use scoped namespace of .proto)
Externally (in pads, use WRN).
Association made in the registry (that X WRN is Y protobuf type).

.proto file is in the registry.