SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jan 2009
    Location
    In the hearts of people who passionately hate me
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Too many AJAX Queries

    Hi,

    If have the following situation:

    I'm using a gallery slideshow. The presenter logs in and starts flipping through. The guests login separately. However, when the presenter clicks to view the next slide, the guests slide should automatically turn to that slide as well.

    I have thought about using a setInterval to check the server every ten seconds. However, this would put a good amount of burden on the database server, especially when there are more than six guests.

    1 - Am I right that it would put a great deal of burden on the database server?
    2 - Is there a better way of going about this?

    Please let me know your thoughts

  2. #2
    SitePoint Member
    Join Date
    Nov 2011
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Whether or not this will put a lot of load on your database server depends on your database server and the number of requests your are receiving. Generally speaking though, I would not say that this is an excessive amount of load. Many chat applications do this same type of polling at a much higher rate.

    The only better way to sync multiple web pages is to use Comet/Long-Polling with a publish/subscribe mechanism. This however does add a lot of complexity to your application.

  3. #3
    SitePoint Member
    Join Date
    Jan 2009
    Location
    In the hearts of people who passionately hate me
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you that helps.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •