[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How can i have persistent objects in the server side?

hemant

5/26/2006 3:03:00 AM

I am making a connection to a application server and getting some data
at a interval of 10 sec and all this is done in Ajax. Now the problem,
once i get the first cycle of data...my connection object dies...so for
the second connection request, which is invoked just 10 seconds after
first one...a new connection object is created and i don't really like
this.

The sad part...is i have defined already a wrapper around connection
class to make sure singleton patterns and all.but still the same thing.

Is there anyway...i can have persistent objects in the Apache Server
side.

I am uisng Ruby-1.8.4 and Rails-1.1.2.

1 Answer

loidee

5/26/2006 9:13:00 AM

0

there are a few solutions to this problem but without knowing the whole
story one solution to this would be to temporarily store the
information on the first request in the database in a simalar fashion
to storing session data when using multiple servers. if you wanted, you
could even store the information snippet as a simple flat text file.
hope this helps - if not give me some feedback and i will try to assist
further