RE: http://www.codeproject.com/aspnet/SimpleChat.asp
In this example they use: static protected ArrayList pArray = new
ArrayList();
The neat trick is this chat doesn’t have to rely on a database or
something like memcached, or text files to preserve the chat and quickly
hand it out to new people joining the chat. Its persisted in-memory
from within IIS or the ASP.NEt worker process from what I gather, kinda
like an Application variable almost.
Now since RoR is deployed on Lighttpd, Apache, Litespeed, or whatever
there doesn’t seem to be anything like this. ie: there is no
“application state”. Sure I could use a database but I really don’t
want to hit the DB each time I get an AJAX call to get the latest chat
messages, or have to house clean them so only the 100 newest items
stayed in the table. Yes I could use memcached, but thats extra
overhead on my server I’d rather not incur if at all possible. Other
ideas I’ve seen is people witting to a text file - again - not ideal and
not scalable. Is there anyway to mimic what ASP.NET can do in RoR?
-thanks-