ASP-Chat, need 4 speed

Results 1 to 3 of 3

Thread: ASP-Chat, need 4 speed

  1. #1
    Join Date
    Dec 1969

    Default ASP-Chat, need 4 speed

    I have made a chat with ASP and I used a texfile to keep the chat-text in but is this a good way to do it?<BR><BR>The txt-file must be opend every time someone says something an evrytime someone refreshes.....not that it goes slowly or that I notice any CPU-use to speak about but anyway.<BR><BR>I thought about using Application("Chat") but that would use memory to be stored (i belive?) so the txt-file option seemed like a better way to do it.<BR><BR>Does anyone know the &#039best&#039 way or some perfomence issues?

  2. #2
    Paul Merton Guest

    Default RE: ASP-Chat, need 4 speed

    I once made an ASP chatroom that used a text file. After a while, the text file got noticably larger and the performance was hit accordingly. I came to the conclusion that it was not a good way to go about doing it!<BR><BR>Even an Access database seemed to be a much better way about doing it. SQL server or Oracle would be good if you are keeping a hell of a lot of past chat history.<BR><BR>Also, there is a serious possibility of things going wrong if lots of people try to access your chat page at the same time - if more than one person tries to write to the text file at the same time, one of them will be denied access and the ASP will fail. (depending on how you&#039ve engineered this bit, you may even end up in a deadlock!)<BR><BR>With databases, you don&#039t need to worry about all that stuff as you can let the database management system work out what to do when there are multiple concurrent reads/writes.<BR><BR>Hope that makes things a bit clearer for you!<BR>Paul.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: ASP-Chat, need 4 speed

    I have read both messages about the text file chatroom. I haven&#039t done anything text file base chatroom but I do have some experience on developing SQL server base chatroom for my company. The performance is delighting. I believe a database chatroom is a straight forward solution for developing a chatroom. It is not only that the SQL server (or any of it kind) handle the multi-user access but also it is much easier to access the past information. Furthermore, I extended the general chatroom facility by allowing the user to create new chatroom (of course, other user can join if he / she wants to). With the back end database, developers can extend the facilities of chatroom with a reasonable amount of effort. With the power of SQL statement, I am pretty sure it is a better idea than text file base chatroom.<BR><BR>However, one thing developer need to bear in mind is that once you no longer need the database object (such as the Server.CreateObjecT("ADODB.RecordSet"), Server.CreateObject("ADODB.Connection")) DO close it. Otherwise the error message (something like -- SQL server has reached it maximium configured users limit...). Even though you created the object in a Sub or Function, you still need to close it. Many new developers thought once the execution left the procedure (Sub / Function), the system / server should release all the resource within that procedure. I am not sure whether other variant variable of ASP code will be released or not, but I am extremely sure that the database object DOES NOT. This will result in the server no longer allow you to create object (in other words, ASP page no longer can access the database) you will then need to reset your server&#039s service to be albe to re-access it.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts