logo       

Re: Re: DWR Bandwidth: msg#00181

java.dwr.user

Subject: Re: Re: DWR Bandwidth




On 2/20/07, Mike <mchristoff4-/E1597aS9LQAvxtiuMwx3w@xxxxxxxxxxxxxxxx> wrote:
That is a good point about frame sizes (what is the size of standard ethernet
frame btw?)

On my debian box:
$ ifconfig
eth0    <blah> MTU:1500

MTU = max tx unit.


but that's not really what I was getting at. Let's just say the
response packets are in the same structure but 10x or even 100x the length. Let
me explain with an example:

s0=[];var s1={};var s2="1 Red Street";s1.address=s2;var s3=2;s1.id=s3;var
s4="Fred";s1.name=s4;var s5=1000001.0;s1.salary=s5;s0[0]=s1;var s6={};var
s7="12 Yellow Road";s6.address=s7;var s8=4;s6.id=s8;var
s9="Shiela";s6.name=s9;var s10= 3000000.0;s6.salary=s10;s0[1]=s6;var
s11={};var s12="42 Brown Lane";s11.address=s12;var s13=3;s11.id=s13;var
s14="Jim";s11.name=s14;var

I understand that this structure is very nice to understand and maps java
perfectly, but if you're dealing with larger packet sizes being requested by
many users (in my particular application we're talking millions) very often
(polling every few seconds) this is going to eat up bandwidth.

Can something like this be accomplished with DWR:

var s1=[2, "1 Red Street","Fred",1000001.0]

Instead of:

s1={};var s2="1 Red Street";s1.address=s2;var s3=2;s1.id=s3;var
s4="Fred";s1.name=s4;var s5=1000001.0;s1.salary=s5;s0[0]=s1;

In short yes.
DWR 2 does a much better job of this. It's very hard because it's tricky to tell if something is recursive without serializing it twice, but mostly we do a good job.

We could take an extra step in a special "slowButCompact" mode, which did double serialize, but that's not an option yet.

Joe.

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise