Hi again,

I've searched somewhat, and came to the definition of something called 
Websockets.

Some guys say that would be possible to do low latency synchronous 
jsonrpc calls, and there is a demo (here: http://rpc.nodester.com/) 
which calls a ^2 (square) function and compares the AJAX with the 
Websockets approach in terms of time spent to retrieve results..

Anybody knows something about this, and this would be good to implement 
in pyjs? It seems that only the newest versions of browsers support this..


João Ventura

Em 04-04-2012 13:06, lkcl luke escreveu:
> On Wed, Apr 4, 2012 at 12:21 PM, Kees Bos<[email protected]>  wrote:
>
>> Synchronous http calls (or json over http) are simply not possible in
>> javascript (i.e. in browsers).
>   that's not quiiite true: the AJAX load function takes a parameter
> true/false which is very rarely used.
>
>   the reason why it is very rarely used is because:
>
>   1) the browser is completely unresponsive - locked up solid - until a
> response is received
>
>   2) there are usually only two outstanding HTTP connections allowed at
> any one time by a web browser engine, in order to prevent overload of
> web servers.
>
> if you attempt to make several synchronous HTTP requests you are
> therefore in for a bit of a shock.  in fact, if you make *any*
> application that uses a synchronous design, its performance will be
> similarly affected.
>
> overall, then, it's very simple: the desktop application, by using
> synchronous function calls, was extremely badly designed i.e. was
> subject to delays and lock-ups.
>
> by subdividing the application along *proper* asynchronous
> event-driven MVC lines, you can split the back-end ("M") into a
> JSONRPC service and leave the V and C to operate at the front-end, and
> the UI will be properly responsive and not subject to delays or
> lock-ups.
>
> l.

Reply via email to