logo       

RE: DWR Bandwidth: msg#00174

java.dwr.user

Subject: RE: DWR Bandwidth

Joe is right about the frame sizes.  Reducing the size of the data isn't always effective.  What you usually want to do is reduce the number of actual requests.
 
Having "addPerson" actually return the value of "getAllPeople" by default could avoid that extra call.  It's always best to do everything possible in each cycle.  If you don't want to modify "addPerson", you could create a new server function that did that like: "addPersonAndGetAll", which called "addPerson", then returned "getAllPeople".
 
 


From: joseph.walker-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx [mailto:joseph.walker-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx] On Behalf Of Joe Walker
Sent: Tuesday, February 20, 2007 10:47
To: users-EyPigyGktj4FDOXUYO6UHQ@xxxxxxxxxxxxxxxx
Subject: Re: [dwr-user] DWR Bandwidth


You could use call batching to send both requests at the same time, but I don't think you could suggest that it's worthwhile optimizing the packet size. All the requests and responses in the example are smaller than a standard ethernet frame, so making them smaller is totally irrelevant.

Joe.

On 2/20/07, Mike Christoff <mchristoff4-/E1597aS9LQAvxtiuMwx3w@xxxxxxxxxxxxxxxx> wrote:
I've been doing a bit of packet sniffing on some of the examples here: http://getahead.ltd.uk/dwr/examples

Particularly the table editing example.  It seems like the request/responses are a bit overweight.  This is what I get for an edit on one cell in one row:

POST /dwr-demo/dwr/exec/Demo.addPerson.dwr HTTP/1.1
Accept: */*
Accept-Language: en-us
Referer: http://getahead.ltd.uk/dwr/examples/table
Content-Type: text/plain
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727)
Host: getahead.ltd.uk
Content-Length: 282
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: JSESSIONID=38B80B0D574C93CC2912EFFA0F102C0A; PHPSESSID=f15a25c4288d0f1bea952068ec7951e0

callCount=1
c0-scriptName=Demo
c0-methodName=addPerson
c0-id=9413_1171932650975
c0-e1=string:1%20Red%20Street
c0-e2=string:2
c0-e3=string:Fred
c0-e4=string:1000001
c0-param0=Object:{address:reference:c0-e1, id:reference:c0-e2, name:reference:c0-e3, salary:reference:c0-e4}
xml=true

POST /dwr-demo/dwr/exec/Demo.getAllPeople.dwr HTTP/1.1
Accept: */*
Accept-Language: en-us
Referer: http://getahead.ltd.uk/dwr/examples/table
Content-Type: text/plain
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727)
Host: getahead.ltd.uk
Content-Length: 92
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: JSESSIONID=38B80B0D574C93CC2912EFFA0F102C0A; PHPSESSID=f15a25c4288d0f1bea952068ec7951e0

callCount=1
c0-scriptName=Demo
c0-methodName=getAllPeople
c0-id=4049_1171932651315
xml=true

HTTP/1.1 200 OK
Date: Tue, 20 Feb 2007 00:50:04 GMT
Server: Apache/2.0.54 (Debian GNU/Linux) DAV/2 mod_jk/1.2.19 PHP/4.3.10-18
Keep-Alive: timeout=15, max=91
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/plain;charset=ISO-8859-1

1d8
var 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 s15=20000.0;s11.salary=s15;
s0[2]=s11;
DWREngine._handleResponse('4049_1171932651315', s0);

0

I realize this is just an example, but I can't figure out how to slim this down.  Any help would be appreciated.

-Mike





____________________________________________________________________________________
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help-EyPigyGktj4FDOXUYO6UHQ@xxxxxxxxxxxxxxxx


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

News | FAQ | advertise