-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Replace ActorID type with UUID or Long instead of String to reduce the size of CRDT meta #36
Comments
Could I try this issue? |
@computerphilosopher Sure. :) |
@hackerwins |
Yes. If we use a type other than The sizes of the types listed in this issue are: Even if we use |
@hackerwins Could I try this if still alive? |
@autumn-n Sure. If you have any questions, please feel free to comment. |
Thank you :) It's the first time with Golang, MongoDB, but I'll give it a try. Before getting started, I'd like to hear your thoughts on the below.
|
Yes, this breaks backward compatibility.
I think
I didn't expect the problem because I saw uint64 at bsonspec. However, it seems a bit cumbersome according to what I searched for. I think we can reduce the size of
Introducing a new field with uint64 can only reduce it by 33.33% more(12 bytes -> 8 bytes), so I think it would be good to define the ObjectID type strictly in the API. |
Ok, then is it gonna be like this?
Because uint64 is supported only for the timestamp.
Sorry I didn't catch it. Could you please tell me more details between Let me sort out what I understand so far. From my understanding, It wants to reduce the size of data on the two points.
Both are used binary data from serializing with Protobuf, so I made a test briefly.
The integer is the best, but no big difference with an |
@autumn-n Thank you for your confirmation. We can reduce it by 50% just by strictly using the type of ObjectID in the Protobuf message. So it is not yet necessary to define a new field of type integer. This is because the logic becomes more complex and can only be reduced by an additional 33.33%. In summary:
|
@hackerwins JS SDK has to be also changed together. |
@autumn-n Thanks for the contribution. |
The sizes of the types:
<-- currently we use
The text was updated successfully, but these errors were encountered: