Re: Transactional DataBases
| From: | Markus Wolff | Date: | Wed, 14 Aug 2002 23:59:04 +0000 |
| Subject: | Re: Transactional DataBases | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-2118@lists.php.net to get a copy of this message | ||
On Thu, 15 Aug 2002 02:30:48 +0300
Martin Tsachev <shaggy@vip.bg> wrote:
> > > How exactly do other applications share the same connection, I don't get
> > > it? There should be a connection for every user and the RDBMS should
> > > guarantee that users don't step on each other.
> >
> > ok. I didn't mean different applications sharing the same connection. I
> > mean different users using the same application that uses only one
> > connection to the DataBase.
>
> William, if different users use the same application it opens a connection for
> each user, normally.
Normally, yes. But if you use an application server or something similar
like SRM (http://www.vl-srm.net/), you can open a database connection
(or any other object/variable) and store it within an SRM object, which
will persist in the server´s memory until it is specifically unset by
any script.
An SRM object can be accessed by any script/application at any time and
will always keep its content. Therefore, more than one instance of an
application or even several different applications can use the same
database connection or complex configuration objects. Or think about
those monstrous object structures that ie. OOH!Forms produces - if you
stored ready-to-use form objects in SRM, you wouldn´t need to
instantiate them again and again on every request, giving you an immense
performance boost and also uses up less memory.
This is a _very_ cool thing.
Regards,
Markus
--
Markus Wolff <wolff@21st.de>