Is the jQuery $ .post () Ajax scale massive, or does it support opening a socket?

I need to create a public website that can handle, say, 100 requests / sec. I want to use Ajax to make it interactive. Ajax should be bulletproof in all major browsers and in all reasonable situations (stopping, reloading the page from the client side, returning the day after leaving the terminal all night, etc.). The server will be a distributed Linux farm.

JQuery $ .post () seems like it can match the score.

In the old days, Ajax was implemented using smart schemes to keep a socket open between the server and the client. This approach then supports Ajax Push, aka HTTP Server Push or Comet, a two-way communication channel that allows the server to initiate packets for the client.

The main problem that I see with this Ajax approach is that it seems to bind the socket on the server for an indefinite long period of time. It does not seem to scale. Secondary problems are that rupture of the modem connection overnight will lead to pipe breakage; reloading a page from a saved local version will probably not restore the live pipe; and different browsers require various untrusted hacks to get Ajax to work in the first place.

Using a strict Ajax client-pull model based on mail requests seems to eliminate all of these drawbacks. I will gladly refuse the possibility of restarting the server if I can get a bulletproof implementation substrate.

So, I am using a simple    call that seems to work very well, at least for Firefox and Safari.$.post( 'serverAjaxModule.php' ,
{mydata: Dataword },
function(output){ do_handle_results( output); });

However, I do not know what this does under the hood. I learn that .post is a macro for .ajax, and there seem to be a few commands, such as .ajaxSetup and .ajaxStart, that have names that appear to make their requirements. And then there is an jquery-ui.min.jsinclude in which almost anything like setup can be run.

My questions, then:

  • Does jquery $ .post really scale to mass use?

  • $.post open-open-socket , ajax ? ?

  • , , .ajaxSetup, .ajaxStart .., $.post - ?

  • jquery ? , , , ?

  • Ajax ?.post, -, POST , ; , , , , Ajax, . , , jquery? -Ajax, ?

  • ? , , - -?

.

+5
2

$.ajaxSetup , :

  • $.post, , - $.ajaxSetup;
  • $.post HTML, , , - , ; /li >

$.ajaxStart .

jQuery UI - , , , , , .. , API .

1 ( ) ; , , ( ) ( ) , ,

2

3

4 , IE6, ( IE6) - JavaScript ( ).

5 IE6

6

  • , , , ​​ ;
  • JSON - - front-end, HTML, , ( , AJAX, HTML, ..);
  • JSON, front-end, Mustache.js, JSON;

/ - Chrome - , Firefox - muncher , 6-12 .

+3

, , , Ajax, . , , . Ajax , , .

0

All Articles