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 8418329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:17:41+00:00 2026-06-10T02:17:41+00:00

I decide to make a chat room. (Server side is PHP or Java). First

  • 0

I decide to make a chat room. (Server side is PHP or Java). First thing, I use AJAX base on this idea:

1) both users will often send request to server to take the latest
message.

2) when one user types message and enter, the text will be send to
server, and server save it to database and waiting for other users
take it.

the disadvantage of this ways is it not efficient. It’s not very problem in chat program, but I decide to make some other function such as draw on screen and share between people.

So, I decide to use other ways. Here is new way :

1) when users connect to chat room, there are “some ways” to remain
them.

2) when some one send text to server, the server will “automatically”
send this text to the rest of users.

I base on Observer Pattern of Gof. And this way works better than other. But the problem I have met in this new way is :

1) what “information” about user will be save. (IP address, … ?)

2) how to send to user ? (when users don’t have request to server).

Please tell me the solution, please. And better, if it’s more detail in Java or PHP.

  • 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-06-10T02:17:43+00:00Added an answer on June 10, 2026 at 2:17 am

    You may use Session to identify and store information about the connected users. The main work is done by the server, and many web framework (PHP, Java, or other) can handle this for you.

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

Sidebar

Related Questions

I want to make an Azure website and i use WWF on it. this
I'm trying to decide whether to use James( http://james.apache.org/ ) or Javamail( http://java.sun.com/products/javamail/ )
Today I decide to make a resolution which consist of testing my Java application
I have read http://www.ibm.com/developerworks/java/library/j-jtp05236/index.html I decide to make my lock uncancelable task by try
I'm trying to decide whether it might make sense to use modernizr.js. Does covering
I'm trying to decide no the best way to make a side-by-side column-like layout
I decide to make my own neverending scroll page which suits exactly my needs
Ok this time I decided to make a list using the STL. I need
This question is about rewriting git history. Six months ago I decided to make
I've decided to make my app java web start, i prepared the .jar file

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.