Building ASP.NET Chat

  • Thread starter Thread starter Yan
  • Start date Start date
Y

Yan

Hi. I am looking to write a Chat App for my site and have been
searching to find out the best way to do it. I was thinking to use
Application variable but if i am going to have different rooms then it
could be a problem keeping track and somewhat of an overhead for the
server. Also i thought about using XML files to keep the data and
then parsing it on the client side, but i don't know if that is a good
solution. It seems to me that using a database is the better
approach. I an wondering if i am going to store the conversation in
the database and the client will refresh the page every few seconds
and that will send a query to the database would be slower then
reading from an xml file.
Would it make sence to use Access or i will have to use SQL as the
database for the chat. Any suggestions would be greatly appreciated.

Yan
 
Hi Yan,

Thanks for posting to the newsgroup.

You don't want to use the Application object to store data that will be
updated frequently. It could easily become a bottleneck for your
application.

XML files would be better than using the Application object, but then you'd
have to bother with multiple concurrent updates, file access permissions,
reading / parsing the file, etc. You would end up writing a lot of plumbing
code by hand. Probably not what you want to do.

I'd go the database route -- specifically SQL Server. SQL Server will scale
much better than Access and is quite a bit more robust -- many, many more
concurrent users, enhanced backup and recovery capabilities, increased
performance, etc. Database I/O can be very fast, especially if you design
your database correctly, so again, no need to go the XML file route.

Good luck with your project!

Hope this helps,
bliz
--
Jim Blizzard, MCSD .NET
Community Developer Evangelist | http://www.microsoft.com/communities
Microsoft

Your Potential. Our Passion.

This posting is provided as is, without warranty, and confers no rights.
 
Back
Top