kwilteam / kwil-db

Other
25 stars 10 forks source link

Replace JSON serialization with custom serialization #155

Closed brennanjl closed 10 months ago

brennanjl commented 11 months ago

JSON serialization is not deterministic across systems, and is pretty inefficient / bloated. Kwil should have its own serialization to solve for these two issues.

ENG-192

jchappelow commented 11 months ago

JSON does create problems in the following ways:

JSON is however great in other ways:

An efficient encoding is desirable for disk space reasons, but if code outside of kwild must be able to replicate the serialization, it should be simple.

Another idea is separate serialization for different domains. It may not be possible, but it would be ideal to have the payload serialization used for actual on-disk storage be different from what is used by either (a) clients or (b) p2p messaging in cometbft. Regarding block storage differing from wire/p2p serializations, it may be that we simply have no ability to distinguish the two with cometbft.

jchappelow commented 10 months ago

Also resolved by https://github.com/kwilteam/kwil-db/pull/178/files#diff-bce770cf8f3839e76ddf4c7a89b21257dd49f6bfc569a5c5151df02daead07fd

Yaiba commented 10 months ago

Also resolved by https://github.com/kwilteam/kwil-db/pull/178/files#diff-bce770cf8f3839e76ddf4c7a89b21257dd49f6bfc569a5c5151df02daead07fd

Should we close this issue?