On Mon, 12 Jun 2000, Gunther Birznieks wrote:
> >Unless you use a cluster of servers for load balancing and high
> >availability, in which case you're right back where you started and you
> >need the Java equivalent of Apache::Session::DBI. I imagine someone has
> >written one in one of the many servlet runners out there.
>
> 1) Many load balancers actually recognize this and do provide some load
> balancing on IP address. This is definately not perfect of course (when you
> have ISP proxies like AOL)... and then when a machine goes down, it's just
> tough luck that the user has to get redirected and relogin or do whatever
> for the session.
It's that second part that is a problem for me. We do a write-through
cache to deal with this, i.e. we write all data to both a local cache
(shared memory, courtesy of BerkeleyDB 3) and a shared database. Reads
check the cache first, and don't bother to go to the database unless what
they want isn't cached. If a machine fails, we only lose the cache.
I know some of the commercial java stuff does the same thing and provides
a nice API for using it.
Threading certainly does have its allure, and I agree that Apache::Session
is neat and that Perl's TIE mechanism is inadequate for the job.
- Perrin