SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Wizard triexa's Avatar
    Join Date
    Dec 2002
    Location
    Canada
    Posts
    2,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How might they do it?

    I was taking a look through CampFire (http://www.campfirenow.com). (If you don't know if it, just use an ajax "shoutfox" for reference I guess)

    The system polls the server every 3 seconds for new messages/events/etc.

    Unless I'm totally out of it, my thoughts are that each poll results in queries:
    - Check for latest messages
    - Check for members in room

    That would mean 2 queries for each of the above every 3 seconds. Surely that isn't the way it's done though, as I would think that would create massively unnecessary serverload.

    Any ideas how to more efficiently accomplish such a task?
    AskItOnline.com - Need answers? Ask it online.
    Create powerful online surveys with ease in minutes!
    Sign up for your FREE account today!
    Follow us on Twitter

  2. #2
    SitePoint Wizard holmescreek's Avatar
    Join Date
    Mar 2001
    Location
    Northwest Florida
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, I checked the link, and I'm not going to sign up for an account to just check it out.

    You could be right about the ajax. But, it could be just a java app (not javascript) but an actual java applet.
    intragenesis, llc professional web & graphic design

  3. #3
    SitePoint Wizard triexa's Avatar
    Join Date
    Dec 2002
    Location
    Canada
    Posts
    2,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by holmescreek
    Well, I checked the link, and I'm not going to sign up for an account to just check it out.

    You could be right about the ajax. But, it could be just a java app (not javascript) but an actual java applet.
    No, it's JavaScript. They use Flash for a couple of things... but im mostly concerned about the server side and checking for updates
    AskItOnline.com - Need answers? Ask it online.
    Create powerful online surveys with ease in minutes!
    Sign up for your FREE account today!
    Follow us on Twitter

  4. #4
    SitePoint Wizard holmescreek's Avatar
    Join Date
    Mar 2001
    Location
    Northwest Florida
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    More than likely AJAX, which I have still been leery to adopt -- sometimes gives me the willies with all the hype about how great it is then the flip side of about all the security holes that can pop up.
    intragenesis, llc professional web & graphic design

  5. #5
    SitePoint Wizard triexa's Avatar
    Join Date
    Dec 2002
    Location
    Canada
    Posts
    2,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by holmescreek
    More than likely AJAX, which I have still been leery to adopt -- sometimes gives me the willies with all the hype about how great it is then the flip side of about all the security holes that can pop up.
    I'm not so much concerns about the client-side... the server-side of things, the actual server checking for new things... I'm basically wondering if there is some alternative to

    - Send update - insert into MySQL
    - Periodically check for updates - check for new records in MySQL
    AskItOnline.com - Need answers? Ask it online.
    Create powerful online surveys with ease in minutes!
    Sign up for your FREE account today!
    Follow us on Twitter

  6. #6
    SitePoint Wizard holmescreek's Avatar
    Join Date
    Mar 2001
    Location
    Northwest Florida
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could easily be a cron job, or other shell script set up on the server side in the background. Its easy to forget that a CLI php script could be running behind the scenes.
    intragenesis, llc professional web & graphic design


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
  •