dev@glassfish.java.net

Re: HA/in-memory replication

From: Larry White <Larry.White_at_Sun.COM>
Date: Fri, 06 Apr 2007 12:49:17 -0700

Hi Ashish:

*complexity* is a fairly ambiguous term. The semantics
of Java serialization on the other hand are well defined - if
also (to be sure) complex themselves at times.

So if your object graph contained in the attributes of http session
are serializable, then all is well. If the issue is figuring that
out, then I would recommend the good discussion in the
Java I/O book by Elliotte Rusty Harold.

If you have specific examples you want to discuss go ahead.

hope that helps,
Larry White

Ashish Sahni wrote:

> Hi Larry,
> All my questions are with respect to 'the *complexity* of data
> that gets stored as http session information'.
>
> Thanks
> Ashish
>
>
>
> Larry White wrote:
>
>> Hi:
>>
>> Leaving aside the question of where Kedar "is coming from"
>> if I understand your question it is "why do objects have to
>> be serializable"? The answer is because we use java serialization
>> to turn the object graph representing http session into a byte array.
>>
>> But I think you knew that already. So perhaps I don't understand
>> yet what your question really is.
>>
>> regards, Larry White
>>
>> Ashish Sahni wrote:
>>
>>> Comment/question inline:
>>>
>>> kedar wrote:
>>>
>>>>
>>>>
>>>> Ashish Sahni wrote:
>>>>
>>>>> Please see inline:
>>>>>
>>>>> kedar wrote:
>>>>>
>>>>>>
>>>>>>> Another question I need answered
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> We will satisfy all your needs :)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I hope not ;)
>>>>>
>>>>>
>>>>>>> since I can't actually verify this now -
>>>>>>> For the application session data to be replicated across
>>>>>>> instances, does the data (stored
>>>>>>> in HttpSession) have to be 'instanceof Serializable' ?
>>>>>>>
>>>>>> I would think so. I hope that you are not storing complex
>>>>>> data structures in the session though.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Define complex ?
>>>>
>>>>
>>>>
>>>>
>>>> Anything that's not simple. Example: a Hashtable<String,String>.
>>>
>>>
>>>
>>>
>>> I'd like to know where you are coming from. Is it only performance
>>> of the replication process that's behind this call or is there more
>>> to it.
>>> And are we (trying to) enforcing this in any way ?
>>>
>>> The reason I bring this up is because you can bet what gets stored
>>> as session data
>>> in a lot of apps is a lot more 'complex' than a 'simple' hashtable.
>>>
>>> Thanks
>>> Ashish
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>