Replies: 2 comments 4 replies
-
I would favor something that can be parsed easily without the need to write it in every language. i.e. I favor the use of protobuf as well. |
Beta Was this translation helpful? Give feedback.
-
I think protobuf/flatbuffers (whether the former or latter depends on benchmarks of speed and size) has advantages for prototyping. I think in the long term a custom format has strong advantages because it reduces the need of a complex runtime to decode tiles. Protobuf is quite a heavy dependency. Profobuf generally shines in large systems with hundred and thousands of types where the IDL definition changes and is extended. It depends ofc on the complexity, but it could make sense to build a custom format (maybe based on something like the postcard spec) to get the best performance out of it. I feel like backwards compatibility is not that important when it comes to tiles because usually tiles are regenerated weekly/monthly. |
Beta Was this translation helpful? Give feedback.
-
A
layer
of COVTiles is basically divided into a metadata section and aFeatureTable
with the actual vector data.The FeatureTable has a colum oriented layout and uses a custom binary encoding.
The structure of a FeatureTable is described in the metadata section see for example the TypeScript decoder or the Protobuf schema. Currently the metadata section is encoded in a custom binary format.
However, using an existing file format to encode the metadata section would have advantages such as using an existing Interface Definition Language (IDL) to describe the structure of the metadata, easy implementation of encoder/decoder, or out-of-the-box support for versioning that a allows backwards and forwards compatibility of the metadata section. Other widley used state-of-the art file formats are also using the approach of combining a exisiting file format for encoding the metadata with a custom binary encoding of the actual data like for example ORC with ProtoBuf, Parquet with Thrift or Arrow with FlatBuffers.
Below is a brief comparison of the different formats with the currently used custom binary encoding:
Protobuf
Pros
Cons
FlatBuffers
Pros
Cons
Currently I'm leaning toward replacing the binary encoding with one of the formats listed above, as the larger tile and library package size is rather negligible. Since COVTiles is optimized in terms of size, as its main use case is designed for the transfer over the network, I would prefer Protobuf over FlatBuffers.
Beta Was this translation helpful? Give feedback.
All reactions