Hi all, i am making one site for social networking with some gr8 features. now i want to add a chat room in it. but i think using a file system or table for chat isnt a good idea as both have lot of cons. i want a chat systme in which people who has joined a room can send recieve messages on a group i dont have any intention for PM in room. just a simple chat room. i can make it in ajax using files or table but that can heavily effect the database considering a good amoun of traffic. i mean in start it iwll run smootly but with increase of traffci its gonna make problems.
one blue idea i have is to use session variable that will be stored in every session user and will be deleted once user logs out etc.
any help will be appreciated
Jump to Post
session is stored per user wise.
So u can not store chat in session as the other user chatting with user can not use each other's session.
Jump to Post
Effectively you need to store the data somewhere.
You can store them on a database, (easiest solution but traffic problems)
xml file (still easy and fast loading but prone to hacking and directory traversal)
or in cookies on each users computer (a minor hacking threat but effecient, however when user …
All 5 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.