here is some statistic:<div><br></div><div><div>low network traffic</div><div>===========================================</div><div>Json-RPC PB</div><div> </div><div>average MIN 0.016 average MIN 0.011</div>
<div>average MAX 0.044 average MAX 0.029</div><div>AVG 0.027 AVG 0.017 </div><div>90% line 0.027 90% line 0.017 </div><div>CLIENTS 139 CLIENTS 142 </div><div>
ERRORS 0 ERRORS 0 </div><div> </div><div>average MIN 0.029 average MIN 0.023</div><div>average MAX 0.426 average MAX 0.159</div><div>AVG 0.151 AVG 0.062 </div>
<div>90% line 0.124 90% line 0.052 </div><div>CLIENTS 317 CLIENTS 316 </div><div>ERRORS 0 ERRORS 0 </div><div> </div><div>
average MIN 0.32 average MIN 0.115</div><div>average MAX 2.763 average MAX 1.521</div><div>AVG 1.064 AVG 0.405 </div><div>90% line 0.908 90% line 0.308 </div><div>CLIENTS 456 CLIENTS 479 </div>
<div>ERRORS 0 ERRORS 0 </div><div> </div><div>average MIN 0.253 average MIN 0.02 </div><div>average MAX 4.031 average MAX 1.486</div><div>
AVG 1.123 AVG 0.296 </div><div>90% line 0.859 90% line 0.189 </div><div>CLIENTS 482 CLIENTS 501 </div><div>ERRORS 30 ERRORS 0 </div><div> </div>
<div> </div><div>hight network traffic (string 7000 length)</div><div>=========================================== </div><div>Json-RPC PB</div><div><br></div><div>
average MIN 0.016 average MIN 1.755 </div><div>average MAX 0.114 average MAX 3.517 </div><div>AVG 0.045 AVG 2.58 </div><div>90% line 0.043 90% line 2.58 </div>
<div>CLIENTS 138 CLIENTS 88 </div><div>ERRORS 0 ERRORS 0 </div><div> </div><div>average MIN 0.333 average MIN 4.923 </div>
<div>average MAX 1.516 average MAX 9.019 </div><div>AVG 0.732 AVG 6.746 </div><div>90% line 0.652 90% line 6.746 </div><div>CLIENTS 288 CLIENTS 173 </div>
<div>ERRORS 0 ERRORS 0 </div><div> </div><div>average MIN 0.409 average MIN 9.505 </div><div>average MAX 2.372 average MAX 16.546 </div>
<div>AVG 1.221 AVG 12.486 </div><div>90% line 1.119 90% line 12.448 </div><div>CLIENTS 429 CLIENTS 273 </div><div>ERRORS 0 ERRORS 0 </div>
<div> </div><div>average MIN 0.414 average MIN 14.22 </div><div>average MAX 3.932 average MAX 22.986 </div><div>AVG 1.639 AVG 17.987 </div>
<div>90% line 1.426 90% line 17.866 </div><div>CLIENTS 496 CLIENTS 392 </div><div>ERRORS 27 ERRORS 0 </div><div><br></div><br><div class="gmail_quote">
On Tue, Feb 16, 2010 at 10:08 PM, Phil Christensen <span dir="ltr"><<a href="mailto:phil@bubblehouse.org">phil@bubblehouse.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Feb 16, 2010, at 2:46 PM, Vlad Shevchenko wrote:<br>
> I have developed two kind of servers:<br>
> api - http server<br>
> memory_db - dict-based server with some logic of putting data to dict and getting it back.<br>
><br>
> Api communicate with memory_db via txJSON-RPC but response time is huge under high load. I also try implementation with replacement txJSON-RPC -> Perspective Broker with no success. PB implementation has 10+ times faster responses when returning data is small (dict with few keys and values like list of 1-5 strings). However, PM much depends on size of returning value. When I return a list of 600 items (each is string with length 20) response time incredibly growing up. Unlike PB, json-rpc implementation keeps it response-time near the same lever as with small return data.<br>
><br>
> Can you suggest some protocol with a small response? Or should I look into development of my own?<br>
<br>
</div></div>It definitely depends on your use case...<br>
<br>
PB can still be a good solution for you if you change your architecture a little bit. Instead of returning a 600-item list, you could return a pb.Referencable object that can iteratively return each row at a time.<br>
<br>
You may also want to look into using Copyable or Cacheable PB objects. More on that here:<br>
<br>
<a href="http://twistedmatrix.com/documents/current/core/howto/pb-copyable.html" target="_blank">http://twistedmatrix.com/documents/current/core/howto/pb-copyable.html</a><br>
<br>
Of course, if you need a large amount of data to be available before you can begin calculations or whatnot, you're going to have to wait for it to be sent no matter what protocol you use.<br>
<font color="#888888"><br>
-phil<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>WBR, Vlad Shevchenko<br><br>
</div>