You are here: Re: Sessions in a load balanced setup « PHP Programming Language « IT news, forums, messages
Re: Sessions in a load balanced setup

Posted by Balazs Wellisch on 01/08/06 02:32

> Oracle RAS was an example. There may be an equivalent for MySQL. (probably
> a commercial product...)

Yes, I guess my next step is to find out what MySQL has to offer in this
regrad.

> 1. There is one database which is replicated across two instances each on
> its own server (i.e. fault tolerance for database and database servers)
> The database access object has one access method which understands which
> database is primary and which is secondary or the database handles this
> for you. Some schemes will also alternate queries between the two
> instances.
> 2. Each web service is on its own server and instantiates a persistence
> object which talks to the database.
> 3. As a user session progresses, each new session value is stored in the
> local persistence object (i.e. the one on the server that the browser is
> currently talking to) *and* the value is also written through to the
> database. This used to be called 'write-through caching'.
> 4. If the user requests session information which is already in the
> persistence object, it is simply handed back.
> 5. If the user requests session information which is not already in the
> persistence object, the database is queried for the [session:tag:value]
> which is then stored in the local persistence object.
> 6. The only place this gets tricky is if you need what used to be known as
> an 'atomic cache invalidate' (i.e. you want to guarantee the value of a
> session variable across all persistence objects or, in other words, force
> all persistence objects to refresh their local copies of the session data
> from the database). If you need this, you will have to work out some sort
> of intra-persistence object protocol (via the database most likely but the
> network also works) to indicate that a [session:tag:value] tuple should be
> refreshed from the database even though it is in the local persistence
> store.
>
> Clearer?
> -david-

I'm with you. Thank you for the advice!

Balazs

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация