Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 657765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:51:36+00:00 2026-05-13T22:51:36+00:00

I have developed a Flash based chat client that displays messages posted by users

  • 0

I have developed a Flash based chat client that displays messages posted by users belonging to a group along with their username and time of writing. The data is stored in a mysql database with the group id, user id and message so that it persists beyond chat sessions and allows users logging in at a later time to see the discussions, less of a chat, more of a notice board. When a user writes a message I want the chat clients to update instantly an appear to be real time chat. My solution so far has been to include an interval in my flash code that calls a PHP page which queries the database for new comments and return this to Flash.

I think from what Ive read that this approach is called long polling? is that right? Is this robust enough for volume? Would I be better looking at pushing the data to the client when there are changes? How do I detect these changes? I have looked at APE for example but I dont think that this stores the messages in a database.

Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:51:36+00:00Added an answer on May 13, 2026 at 10:51 pm

    The bad thing about polling is, it can become expensive quite fast.

    let’s assume, you have 10000 users online, who want the chat to have a delay no bigger than 1 second. Then youn will bombard your server with 10000 requests per second.

    for smaller things or things that needn’t be up to date, polling is a good approach, since its simple and can’t really go wrong.

    if this is just for a small community with upto 100 people using the chat, then this should not be the problem.

    apart from that, you could use APE or SmartFox, or Red5 or a lot of different things to create a persistent relay server, i.e. a server that has permanent connections to all clients and notifies them of any changes (e.g. new messages).

    as always, my personal advice is to use Haxe. You can use the chat tutorial to get started. Haxe has quite a steep learning curve, but I think it’s totally worth it. I’m happy to have left both ActionScript and PHP behind.

    edit: what you describe is not long polling. Also, you can hardly do long polling with PHP, at least if classicaly used with Apache. Apache will create a certain number of PHP processes. Any time a request arrives, it’ll look for a free PHP process and let it process the request. When the PHP process is done, it sends the response back to the client. If there are no free processes available, it will buffer the request until a process becomes available. Thus you could totally block your whole server if you tried doing long polling with PHP the classical way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have developed our website(Business users website) in .net Framework 2.0 Our client us
I've never developed Flash before but I have a project where I want to
I have developed a VB.NET WCF service that recives and sends back data. When
We have developed a website that uses MVC, C#, and jQuery. In one of
We have developed a webservice that sits and runs in the context of a
I have developed a framework that is used by several teams in our organisation.
I have a site which has been developed completely in flash. Now the site
I have a plain html web page with an embedded flash object. Based on
I have developed some classes with similar behavior, they all implement the same interface.
I have developed some custom DAO-like classes to meet some very specialized requirements for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.