Chat App

They have: 82 posts

Joined: Oct 2001

OK Guys I am writing yet another ASP Refreshing chat app.
One day I will really learn Java and do it right.

Here is my question:

On a real chat application you can see the whole conversation
by scrolling up. In asp when you do this:

<?php
=Application("chat10")
?>

<?php
=Application("chat9")
?>

<?php
=Application("chat8")
?>

<?php
=Application("chat7")
?>

<?php
=Application("chat6")
?>

<?php
=Application("chat5")
?>

<?php
=Application("chat4")
?>

<?php
=Application("chat3")
?>

<?php
=Application("chat2")
?>

<?php
=Application("chat1")
?>

You only have up to 10 lines
How can I have as many lines as I need?

I have thought about writing the conversation to a text file and
reading the text file in if someone wanted to see the entire conversation, but wouldn't it blow up with 20-50 users all writing to and reading from the file?

Thanks!!!!!

- Mike
mikeross.tv

Laughing out loud

Blessed is the man who fears the LORD, who delights greatly in his commandments. Psalms 112:1

They have: 82 posts

Joined: Oct 2001

How much data can an Application variable hold?

Application("chat1") = Application("chat1") & "" & Request.Cookies("nick") & ": " & txtMessage

If I put all of the messages in this variable it works.
But will it blow up when it gets to be a certain size?

Thanks,

- Mike

Blessed is the man who fears the LORD, who delights greatly in his commandments. Psalms 112:1

Peter J. Boettcher's picture

They have: 812 posts

Joined: Feb 2000

I don't know off-hand how large Application variables can be. Obviously they are limited to the physical and virtual memory limits on your server. You can probably stuff a whole lot of stuff in it, but the bigger it get's the slower your server will get since you'll start chewing up memory. So in otherwords it will blow up, I'm just not sure how long it will take.

What you should probably do is archive the data to an xml file or database as it reaches a certain size (number of characters or lines) so you don't get nasty users crashing your server by flooding it.

PJ | Are we there yet?
pjboettcher.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.