[infinispan-dev] storeAsBinary: serialize keys, values, or both?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[infinispan-dev] storeAsBinary: serialize keys, values, or both?

Manik Surtani
The current behaviour is both.

But there are good reasons for finer grained control.  Please have a look at https://issues.jboss.org/browse/ISPN-1097 and let me know what you think!

Cheers

_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] storeAsBinary: serialize keys, values, or both?

Sanne Grinovero
I'm also wondering how the equals is performed on a serialized key; I
assume they are compared as byte[], but if that's the case that should
be clearly documented as it would ignore any custom equals()
implementation.

If instead all keys are deserialized for each equals operation... well
I suppose the internal datacontainer won't perform that well.

Sanne

2011/5/11 Manik Surtani <[hidden email]>:

> The current behaviour is both.
> But there are good reasons for finer grained control.  Please have a look
> at https://issues.jboss.org/browse/ISPN-1097 and let me know what you think!
> Cheers
> Manik
> --
> Manik Surtani
> [hidden email]
> twitter.com/maniksurtani
> Lead, Infinispan
> http://www.infinispan.org
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>

_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] storeAsBinary: serialize keys, values, or both?

Manik Surtani

On 11 May 2011, at 18:27, Sanne Grinovero wrote:

I'm also wondering how the equals is performed on a serialized key; I
assume they are compared as byte[], but if that's the case that should
be clearly documented as it would ignore any custom equals()
implementation.

Your assumption is correct:


Good point that it needs to be documented clearly.  Doing it now.

Cheers
Manik
--


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] storeAsBinary: serialize keys, values, or both?

Manik Surtani

On 12 May 2011, at 16:06, Manik Surtani wrote:


On 11 May 2011, at 18:27, Sanne Grinovero wrote:

I'm also wondering how the equals is performed on a serialized key; I
assume they are compared as byte[], but if that's the case that should
be clearly documented as it would ignore any custom equals()
implementation.

Your assumption is correct:


Good point that it needs to be documented clearly.  Doing it now.

Done: 


--


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] storeAsBinary: serialize keys, values, or both?

Sanne Grinovero
thank you.
Not very critical for functionality, but now I'm wondering if the
consistent hash is being calculated on the binary form of the key?
Just curious if we might end up with inconsistent definitions of
"owner" in case it's possible to have the hash function invoked at
different points of the key's lifecycle (i.e. if at some point it's
calculated on the object form, and in other points of the code it's
calculated on byte[], then something would break).

Especially, if I where to write any custom extension needing to know
the owner of a specific key, if I have to apply some considerations.

Sanne

2011/5/12 Manik Surtani <[hidden email]>:

>
> On 12 May 2011, at 16:06, Manik Surtani wrote:
>
> On 11 May 2011, at 18:27, Sanne Grinovero wrote:
>
> I'm also wondering how the equals is performed on a serialized key; I
> assume they are compared as byte[], but if that's the case that should
> be clearly documented as it would ignore any custom equals()
> implementation.
>
> Your assumption is correct:
> https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/marshall/MarshalledValue.java#L176
> Good point that it needs to be documented clearly.  Doing it now.
>
> Done:
> http://community.jboss.org/wiki/Marshalling#Equality_Considerations
> --
> Manik Surtani
> [hidden email]
> twitter.com/maniksurtani
> Lead, Infinispan
> http://www.infinispan.org
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>

_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] storeAsBinary: serialize keys, values, or both?

Erik Salter
Funny you should mention this -- this is a VERY critical consideration for us.

Erik

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Sanne Grinovero
Sent: Thursday, May 12, 2011 11:59 AM
To: infinispan -Dev List
Subject: Re: [infinispan-dev] storeAsBinary: serialize keys, values, or both?

thank you.
Not very critical for functionality, but now I'm wondering if the consistent hash is being calculated on the binary form of the key?
Just curious if we might end up with inconsistent definitions of "owner" in case it's possible to have the hash function invoked at different points of the key's lifecycle (i.e. if at some point it's calculated on the object form, and in other points of the code it's calculated on byte[], then something would break).

Especially, if I where to write any custom extension needing to know the owner of a specific key, if I have to apply some considerations.

Sanne

2011/5/12 Manik Surtani <[hidden email]>:

>
> On 12 May 2011, at 16:06, Manik Surtani wrote:
>
> On 11 May 2011, at 18:27, Sanne Grinovero wrote:
>
> I'm also wondering how the equals is performed on a serialized key; I
> assume they are compared as byte[], but if that's the case that should
> be clearly documented as it would ignore any custom equals()
> implementation.
>
> Your assumption is correct:
> https://github.com/infinispan/infinispan/blob/master/core/src/main/jav
> a/org/infinispan/marshall/MarshalledValue.java#L176
> Good point that it needs to be documented clearly.  Doing it now.
>
> Done:
> http://community.jboss.org/wiki/Marshalling#Equality_Considerations
> --
> Manik Surtani
> [hidden email]
> twitter.com/maniksurtani
> Lead, Infinispan
> http://www.infinispan.org
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>

_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev

The information contained in this message is legally privileged and confidential, and is intended for the individual or entity to whom it is addressed (or their designee). If this message is read by anyone other than the intended recipient, please be advised that distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please notify the sender immediately and delete or destroy all copies of this message.

_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] storeAsBinary: serialize keys, values, or both?

Manik Surtani
In reply to this post by Sanne Grinovero
The hashcode is the same either way:



On 12 May 2011, at 16:59, Sanne Grinovero wrote:

thank you.
Not very critical for functionality, but now I'm wondering if the
consistent hash is being calculated on the binary form of the key?
Just curious if we might end up with inconsistent definitions of
"owner" in case it's possible to have the hash function invoked at
different points of the key's lifecycle (i.e. if at some point it's
calculated on the object form, and in other points of the code it's
calculated on byte[], then something would break).

Especially, if I where to write any custom extension needing to know
the owner of a specific key, if I have to apply some considerations.

Sanne

2011/5/12 Manik Surtani <[hidden email]>:

On 12 May 2011, at 16:06, Manik Surtani wrote:

On 11 May 2011, at 18:27, Sanne Grinovero wrote:

I'm also wondering how the equals is performed on a serialized key; I
assume they are compared as byte[], but if that's the case that should
be clearly documented as it would ignore any custom equals()
implementation.

Your assumption is correct:
https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/marshall/MarshalledValue.java#L176
Good point that it needs to be documented clearly.  Doing it now.

Done:
http://community.jboss.org/wiki/Marshalling#Equality_Considerations
--
Manik Surtani
[hidden email]
twitter.com/maniksurtani
Lead, Infinispan
http://www.infinispan.org



_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev



_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev