ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilya Kasnacheev <ilya.kasnach...@gmail.com>
Subject Re: BinaryObject vs a HashMap
Date Tue, 02 Oct 2018 10:05:51 GMT
Hello!

You cannot avoid deserialization since data is stored in off-heap in
serialized form and also perhaps sent over network.

If you have a lot of different types, using HashMap will be preferred (with
primitive keys/values).
You could also try storing byte[] values to have precise control over
serialization.

Regards,
-- 
Ilya Kasnacheev


вт, 2 окт. 2018 г. в 11:52, Mikael <mikael-aronsson@telia.com>:

> Hi!
>
> Is there some meta data storage overhead for binary object "types" ? I
> need a cache where the value is pretty much a small key value store
> (5-10 keys and values, all strings, every value different) and with that
> few values maybe just two arrays with keys and values or a hash map, but
> as I will read out single values all the time I thought using binary
> objects would be a better choice to avoid deserialization, but all
> objects will be different, so if the cache has 10000 entries all 10000
> might be different "type", would it be a good choice to use a binary
> object as a simple key/value storage or would I be better of using a
> POJO or HashMap ?
>
> What I don't get is if there is some meta data stored behind the scenes
> for each different type of binary object I create or if it's fine to
> have all binary objects in a cache all being different.
>
> Mikael
>
>
>

Mime
View raw message