debop / hibernate-redis

hibernate 2nd level cache privder using redis
Apache License 2.0
357 stars 184 forks source link

change Java Built In Serializer to Fast-Serializer #15

Closed debop closed 10 years ago

debop commented 10 years ago

I test some serializer for reduce cache size and increse speed serialization.

try message pack, google proto-buff, Kryo, Fast-Serialization ...

Message Pack need @Message annotation (if you want not to use, register type) proto-buff, Kryo does not match for JPA but Fast-Serialization is fast and simple, thread-safe!

I make some benchmark ...

warn-up : 37098 binary-small : 59590 binary-long : 343960

warn-up : 40268 snappy-small : 22590 snappy-long : 79545

warn-up : 227796 FST-small : 18828 FST-long : 259602

warn-up : 516 FST-Snappy-small : 9312 FST-Snappy-long : 21542

I decide to use FST + Snappy !

It's so fast, I guess!

debop commented 10 years ago

FST has some problem. when running in Tomcat, incorrect behavior for Float type. I decide remove FST, so currently use Snappy + Java Built-In Serializer

RuedigerMoeller commented 10 years ago

hi, could please file an issue + example for the fst float problem ? i am not aware of it, but will fix.

debop commented 10 years ago

Hi @RuedigerMoeller I like FST which is fastest I found! really fast! and test success in all unit test which use snappy + fst in hibernate-redis (in multi-thread env)

but when running in Tomcat. any other type is correct value. only Float type is loose original value and setting like ~ 1.0e-204f

I will reproduce some code and report you. Thanks your interesting.

debop commented 10 years ago

reproduce FST bug when run in multi-thread env. need to extract code for reporting bug....

debop commented 10 years ago

bug fixed in FST 1.53