1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    39
    Vote Rating
    0
    PuritysDisciple is on a distinguished road

      0  

    Default AJAX: Machine Gun or Cannon?

    AJAX: Machine Gun or Cannon?


    Im currently working on a project that has to look up and create many locations on a map (currently Google Maps API). All of these locations also have details. I was wondering which is better for server health:

    Load original location
    Query arround location
    Load each item seperatly

    or...

    Load original location
    Query arround location
    Load all items together

    Currently they all load seperatly which means that they kind of "pop" into view as youre looking at the map run your search, however it is also running anywhere from 3 - 100+ server requests which can increase the server load dramaticly.

    My main question is this: If I combine these requests into one giant request will the other users on the server be less likely to be interupted? Due to IIS request limit only 4 requests can be made at a bime per processer (so 16 here), so the tought was that by running a lot of small requests other users could get their request into the middle of this massive chain of requests instead of forcing everyone to wait for the search to finish.

    Any thoughts?

  2. #2
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Virginia, USA
    Posts
    220
    Vote Rating
    0
    dfenwick will become famous soon enough

      0  

    Default


    By all means, bundle them into a single request and then parse out the response in your application. If you perform a single request to the web server providing a list of things you want it to return to you, you're going to run only on one IIS thread. So the other users will continue to have 15 threads to work with and you'll only be impacting a single thread.

    In addition, since the default number of connections to remote HTTP servers is configured to 4 for Internet Explorer, even if you tried to send 100 connection attempts it will only process them 4 at a time in a FIFO, and you'd then impact any other accesses to that web server for the person sitting at the computer. By rolling it all into 1 request/response, even though it's a large request/response, you're freeing up the user to continue to look at other pages on the server if necessary.

Similar Threads

  1. Compatibility with asp.net and asp.net ajax
    By ronnyek in forum Ext 1.x: Help & Discussion
    Replies: 8
    Last Post: 10 Dec 2007, 6:57 PM
  2. Ext and Ajax Pro
    By rodiniz in forum Ext 2.x: Help & Discussion
    Replies: 23
    Last Post: 24 May 2007, 2:04 PM
  3. Ext and Ajax Pro
    By rodiniz in forum Community Discussion
    Replies: 30
    Last Post: 4 May 2007, 12:00 PM
  4. How to assign a value to a var using AJAX?
    By Bobafart in forum Ext 1.x: Help & Discussion
    Replies: 16
    Last Post: 26 Feb 2007, 5:06 PM
  5. Hello World + AJAX? Need Help.
    By samihoda in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 11 Jan 2007, 12:50 PM

Thread Participants: 1