-
Notifications
You must be signed in to change notification settings - Fork 58
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
API-553 Compact serialization and Generic Records #1172
API-553 Compact serialization and Generic Records #1172
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have reviewed and tried to add meaningful comments. Let's discuss.
this.putIfAbsent(schema); | ||
this.logger.trace('SchemaService', `Found schema id ${schemaId} on the cluster`); | ||
} else { | ||
this.logger.trace('SchemaService', `Did not find schema id ${schemaId} on the cluster`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.NET also throws an exception in this situation
test/integration/backward_compatible/parallel/serialization/compact/LazyDeserialization.js
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved.
Compact Serialization
This PR adds the compact serialization support to Node.js client. This new method is more efficient and easier to use. For Java it even works with zero config. In Node.js it is not possible and needs a portable-like configuration.
Benchmark of Eager deserialization + Controlled Serialization vs Master
The async toData/toObject issue is solved using eager deserialization when reading and controlled serialization when writing. I did a benchmark as requested by the team.
Environment
Client and Server commits
Client master: e695651
Client eager deserialization: 9cf2299
Server commit: hazelcast/hazelcast@151c683
Lab environment
1 client 1 server on lab 116 117
command on 116:
node Benchmark.js -t 15000000 -c 1024
command on 117:
docker run --rm --net=host -p 10.212.1.117:5701:5701 hazelcast/hazelcast:5.1-SNAPSHOT
Results
Master
Starting warm-up with 1500000 operations
Warm-up finished
Took 237.587670114 seconds for 15000000 operations
Ops/s: 63134.589403577455
Benchmark finished
Eager deserialization
Starting warm-up with 1500000 operations
Warm-up finished
Took 240.487756286 seconds for 15000000 operations
Ops/s: 62373.237755028385
Benchmark finished
Another run to see deviation of the result:
Starting warm-up with 1500000 operations
Warm-up finished
Took 233.191881556 seconds for 15000000 operations
Ops/s: 64324.70933340712
Benchmark finished
So the deviation is high and about 1-2k. The %1 difference is normal and I conclude that performance did not change. Runs on local also is the same.
END RESULT
There is no difference.