logo       

Re: DWR Bandwidth: msg#00179

java.dwr.user

Subject: Re: DWR Bandwidth

That is a good point about frame sizes (what is the size of standard ethernet
frame btw?), 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;

I understand DWR may not be optimal for this application since I'm kind of
breaking the link between the javascript and java object, but I guess what I'm
trying to ask is there a way to massage dwr to get the packet size I'm
looking for? Maybe I would be better off writing something custom for my needs?

Let me know if I'm missing something here.

-Mike


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

News | FAQ | advertise