Replies: 3 comments 2 replies
-
Hello, i couldn't pay attention because i was busy last few days. |
Beta Was this translation helpful? Give feedback.
-
The GoB package is a "private" codec provided by Golang.They say it's efficiency will be higher than JSON, XML, etc. Therefore, the communication between the two Go services like chat app, log app always pursure time accuracy, this kind of data consistency is useful for developing instant messaging products to calibrate time. so the GoB might is a good solution. 👍 |
Beta Was this translation helpful? Give feedback.
-
I created PR #47 for this :=) |
Beta Was this translation helpful? Give feedback.
-
Hi, everyone, I created this discussion to collect opinions and suggestions, since this is a very sensitive topic.
Currently, CloverDB serializes documents to json before storing them on disk. This has been done because of the fact that, early versions of the library used ".json" files directly to store data.
But since Clover evolved since that time (it now uses the badger kv-store), this solution is no more acceptable for the following reasons:
json.Unmarshal()
deserializes them to normal stings. This affects queries involving dates or times (unless you decide to store them as a timestamp during document insertion).To fix these issues, I was thinking to switch to the gob encoding, which preserves the correct type for each document field.
This open a new question about internal data types:
Which numeric types should be supported by clover? Should we preserve all of the types (int, uint8/int8, uint16/int16... and so on) or should we restrict types (using int64 for integer numbers and float64 for double numbers, for example).
What do you think about this?
Beta Was this translation helpful? Give feedback.
All reactions