You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jess Holle <je...@ptc.com> on 2008/10/20 14:02:09 UTC
Another session replication question
I somehow missed Filip Hanik's helpful response to my previous session
replication question.
I have one other:
With DeltaManager and/or BackupManager, are multiple calls to
setAttribute() and/or removeAttribute for the same attribute during
the same request coalesced/collapsed?
It is my understanding that the delta is sent at the end of the request
-- or did I misunderstand this? If so, I would hope/assume a sequence like:
setAttribute( "foo", "bar" );
setAttribute( "foo", "something else" );
removeAttribute( "foo" );
setAttribute( "baz", "bar" );
setAttribute( "baz", "something else" );
would result in the delta consisting of only
removeAttribute( "foo" );
setAttribute( "baz", "something else" );
Obviously this is not so critical in this example -- but easily could be
if the values passed to setAttribute() are large object graphs rather
than simple strings.
--
Jess Holle
Re: Another session replication question
Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
what you could do, is to replace the replication valve logic, with your
own, that would fit your own application
Filip
Jess Holle wrote:
> Thanks for the info.
>
> A little more reading of the code and I clearly see that -- sorry for
> the dumb question.
>
> Now for the hard part - determining if we really can and should start
> replicating a large application grown over the last decade -- given
> the limitations of setAttribute/removeAttribute()-based change
> detection, last-request-wins session update, etc...
>
> --
> Jess Holle
>
> Filip Hanik - Dev Lists wrote:
>> hi Jess, you're example is correct, replication doesn't happen until
>> the request is complete and is done by the ReplicationValve.
>>
>> Filip
>>
>> Jess Holle wrote:
>>> I somehow missed Filip Hanik's helpful response to my previous
>>> session replication question.
>>>
>>> I have one other:
>>>
>>> With DeltaManager and/or BackupManager, are multiple calls to
>>> setAttribute() and/or removeAttribute for the same attribute during
>>> the same request coalesced/collapsed?
>>>
>>> It is my understanding that the delta is sent at the end of the
>>> request -- or did I misunderstand this? If so, I would hope/assume
>>> a sequence like:
>>>
>>> setAttribute( "foo", "bar" );
>>> setAttribute( "foo", "something else" );
>>> removeAttribute( "foo" );
>>>
>>> setAttribute( "baz", "bar" );
>>> setAttribute( "baz", "something else" );
>>>
>>> would result in the delta consisting of only
>>>
>>> removeAttribute( "foo" );
>>> setAttribute( "baz", "something else" );
>>>
>>> Obviously this is not so critical in this example -- but easily
>>> could be if the values passed to setAttribute() are large object
>>> graphs rather than simple strings.
>>>
>>> --
>>> Jess Holle
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Another session replication question
Posted by Jess Holle <je...@ptc.com>.
Thanks for the info.
A little more reading of the code and I clearly see that -- sorry for
the dumb question.
Now for the hard part - determining if we really can and should start
replicating a large application grown over the last decade -- given the
limitations of setAttribute/removeAttribute()-based change detection,
last-request-wins session update, etc...
--
Jess Holle
Filip Hanik - Dev Lists wrote:
> hi Jess, you're example is correct, replication doesn't happen until
> the request is complete and is done by the ReplicationValve.
>
> Filip
>
> Jess Holle wrote:
>> I somehow missed Filip Hanik's helpful response to my previous
>> session replication question.
>>
>> I have one other:
>>
>> With DeltaManager and/or BackupManager, are multiple calls to
>> setAttribute() and/or removeAttribute for the same attribute during
>> the same request coalesced/collapsed?
>>
>> It is my understanding that the delta is sent at the end of the
>> request -- or did I misunderstand this? If so, I would hope/assume a
>> sequence like:
>>
>> setAttribute( "foo", "bar" );
>> setAttribute( "foo", "something else" );
>> removeAttribute( "foo" );
>>
>> setAttribute( "baz", "bar" );
>> setAttribute( "baz", "something else" );
>>
>> would result in the delta consisting of only
>>
>> removeAttribute( "foo" );
>> setAttribute( "baz", "something else" );
>>
>> Obviously this is not so critical in this example -- but easily could
>> be if the values passed to setAttribute() are large object graphs
>> rather than simple strings.
>>
>> --
>> Jess Holle
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Another session replication question
Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
hi Jess, you're example is correct, replication doesn't happen until the
request is complete and is done by the ReplicationValve.
Filip
Jess Holle wrote:
> I somehow missed Filip Hanik's helpful response to my previous session
> replication question.
>
> I have one other:
>
> With DeltaManager and/or BackupManager, are multiple calls to
> setAttribute() and/or removeAttribute for the same attribute during
> the same request coalesced/collapsed?
>
> It is my understanding that the delta is sent at the end of the
> request -- or did I misunderstand this? If so, I would hope/assume a
> sequence like:
>
> setAttribute( "foo", "bar" );
> setAttribute( "foo", "something else" );
> removeAttribute( "foo" );
>
> setAttribute( "baz", "bar" );
> setAttribute( "baz", "something else" );
>
> would result in the delta consisting of only
>
> removeAttribute( "foo" );
> setAttribute( "baz", "something else" );
>
> Obviously this is not so critical in this example -- but easily could
> be if the values passed to setAttribute() are large object graphs
> rather than simple strings.
>
> --
> Jess Holle
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org