RE: [OT] Clustering

2004-08-27 Thread Ivan Vasquez
I assume you ask about an Oracle RAC database. 

In that case, the mode is "kind-of" ACTIVE/ACTIVE: What you get is a
single database mounted by as many instances as cluster nodes you have
configured. So every time your application establishes a db connection,
it may be served by either cluster node.

The data files can be in a clustered file system (like OCFS), in raw
partitions or even in NFS mounts.

There are a few guidelines to develop apps meant to run in a clustered
database:
http://www.cise.ufl.edu/help/database/oracle-docs/rac.920/a96598/design.
htm

Ivan.

-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 27, 2004 7:35 AM
To: Struts Users Mailing List
Subject: [OT] Clustering

Hi All,

 

I am developing a J2EE application using Oracle 9iAS. I am looking for
clustering information.

 

I am looking for info on database side.

 

* Are Database servers clustered in an ACTIVE/ACTIVE or
ACTIVE/PASIVE mode?

 

* Is the Oracle database supposed to reside on a file system or
on a RAW partition?

 

TIA.

 

Regards,

Viral

 

 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Clustering Application Scope Objects

2004-04-10 Thread Curtis Taylor
Hi Mike,

This is an interesting question. Using the PlugIn interface to store 
"semi-static" data in the app context is a commonly accepted pattern (we use it 
in the project I'm working on now). However, there's no mechanism currently 
available in Struts to allow for data model change event notification 
(evidently, that's the major difference between Struts & Barracuda, from what 
little I understand of Barracuda). I'd personally love it if there were a simple 
mechanism available to Struts for just such event notification.

In the meantime, you may want to store such data in session scope, as it's more 
"volatile" (periodically speaking). I don't know the nature of your data, but if 
it isn't a huge amount, it shouldn't be a problem.

Keep us posted on your progress.

Curtis
--
cee dot tee at verizon dot net
Mike Duffy wrote:
Thanks Christian,

Let me give you a specific example of what I am trying to do.

I have several different sets of label/value pairs that are stored in database tables. 
 These
label/value pairs make up the select options and other interface options for web pages 
in the
application.  The options do not change that often, so rather than going back to the 
database each
time a page is displayed, I'd like to store the options in maps that are stored in 
application
scope and easily accessible through JSTL.
On the occasion that the options do change, I'd like to reload the applicable maps to all servers
in the cluster.  

It seems like this would be a good feature for Tomcat to have, but from reading the 
documentation
it seems that the feature is not there.
Perhaps some sort of JMS broadcast service would do the trick.  Does any one have any suggestions?

Mike


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] Clustering Application Scope Objects

2004-04-10 Thread Matt Sgarlata
Hi Mike,

Your JMS approach sounds fairly sophisticated; could take a while to 
implement ;-)

Hibernate provides some out-of-the-box cacheing implementations, some of 
which take on this problem.  I think you'll find this portion of their 
user guide fairly relevant:

http://www.hibernate.org/hib_docs/reference/html_single/#performance-s3

In particular, the SwarmCache and JBoss TreeCache look like they could 
do what you're looking for.  I bet they could be used outside Hibernate 
too, but I'm not sure.

Matt

Mike Duffy wrote:

Thanks Christian,

Let me give you a specific example of what I am trying to do.

I have several different sets of label/value pairs that are stored in database tables. 
 These
label/value pairs make up the select options and other interface options for web pages 
in the
application.  The options do not change that often, so rather than going back to the 
database each
time a page is displayed, I'd like to store the options in maps that are stored in 
application
scope and easily accessible through JSTL.
On the occasion that the options do change, I'd like to reload the applicable maps to all servers
in the cluster.  

It seems like this would be a good feature for Tomcat to have, but from reading the 
documentation
it seems that the feature is not there.
Perhaps some sort of JMS broadcast service would do the trick.  Does any one have any suggestions?

Mike

--- Christian Bollmeyer <[EMAIL PROTECTED]> wrote:
 

On Saturday 10 April 2004 21:48, Mike Duffy wrote:

Hi,

   

I've read documentation for The Tomcat 5 Servlet/JSP Container:
Clustering/Session Replication HOW-TO
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html
I understand clustering for individual user sessions.  Are there any
correlated methods for clustering application scope objects?
 

AFAIK there's nothing in the Servlet API specifications in this
direction. Sessions may be swapped in and out by several
different means (serialization or database), but application
scope information is kept individually for each JVM.
   

The J2EE API for the Interface ServletContext states, "In the case of
a web application marked "distributed" in its deployment descriptor,
there will be one context instance for each virtual machine. In this
situation, the context cannot be used as a location to share global
information (because the information won't be truly global). Use an
external resource like a database instead."
 

Yes. But then, it makes no difference whether your application
is marked as 'distributable' or not when considering application
scope objects. Application scope is always limited to a single
JVM. 'Distributed' is about sessions only.
   

Rather than use a database, what I would like to be able to do is
make a call to
   servlet.getServletContext().setAttribute(key, object);

and have the object stored in the application scope of all servers in
the cluster.
 

That surely would be desirable, but I don't know of any
'official', declarative means to achieve such behavior.
Then: automatically synchronizing application scopes
between several JVM instances would cause a lot of
additional synchronization troubles - who determines
what's the actual system state at a given point, e.g.
if you update an application scope object (that is
globally shared) on one server, and another user
does likewise on a second one, what should be
the end result? And so on.
   

I know that EJBs were designed to serve this purpose; however, I
would like to bypass the overhead and complexities of EJBs.
 

EJBs live in the backend and are independant from
the web tier. Looking at the problem from a 
web tier view (which is what Struts is about),
it should not make any difference whether the
information comes directly from a database
in the end or from an EJB tier in-between.
That's transparent. Anyway, using EJBs
won't solve your problem in the end, for
it's an entirely web tier specific issue,
and EJBs are not part of that.   

   

If there isn't a switch that can be flipped in Tomcat, there might be
a way to create a lightweight JMS administration class to serve this
purpose.  Has anyone tried this?
 

There is no switch (remember the spoon
boy in Matrix I ? :-). But the JMS idea is
interesting. Never actually tried it, but
of course, you can always handle
application specific logic programma-
tically, including using JMS for updating
application scopes in a distributed 
environment. But I never tried.

   

If the answer to this question is RTFM, please send a link; I've
looked through the documentation and I can't seem to find a clear
reference.
Thanks for your time and consideration.
 

Just some thoughts that came to me
on early Easter Sunday :-) Let's better
say: night; it's 2:16 local time here. So
I should better go to bed.
   

Mike
 

HTH,
-- Chris.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-

Re: [OT] Clustering Application Scope Objects

2004-04-10 Thread Mike Duffy
Thanks Christian,

Let me give you a specific example of what I am trying to do.

I have several different sets of label/value pairs that are stored in database tables. 
 These
label/value pairs make up the select options and other interface options for web pages 
in the
application.  The options do not change that often, so rather than going back to the 
database each
time a page is displayed, I'd like to store the options in maps that are stored in 
application
scope and easily accessible through JSTL.

On the occasion that the options do change, I'd like to reload the applicable maps to 
all servers
in the cluster.  

It seems like this would be a good feature for Tomcat to have, but from reading the 
documentation
it seems that the feature is not there.

Perhaps some sort of JMS broadcast service would do the trick.  Does any one have any 
suggestions?

Mike


--- Christian Bollmeyer <[EMAIL PROTECTED]> wrote:
> On Saturday 10 April 2004 21:48, Mike Duffy wrote:
> 
> Hi,
> 
> > I've read documentation for The Tomcat 5 Servlet/JSP Container:
> > Clustering/Session Replication HOW-TO
> > http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html
> >
> > I understand clustering for individual user sessions.  Are there any
> > correlated methods for clustering application scope objects?
> 
> AFAIK there's nothing in the Servlet API specifications in this
> direction. Sessions may be swapped in and out by several
> different means (serialization or database), but application
> scope information is kept individually for each JVM.
> 
> > The J2EE API for the Interface ServletContext states, "In the case of
> > a web application marked "distributed" in its deployment descriptor,
> > there will be one context instance for each virtual machine. In this
> > situation, the context cannot be used as a location to share global
> > information (because the information won't be truly global). Use an
> > external resource like a database instead."
> 
> Yes. But then, it makes no difference whether your application
> is marked as 'distributable' or not when considering application
> scope objects. Application scope is always limited to a single
> JVM. 'Distributed' is about sessions only.
> 
> > Rather than use a database, what I would like to be able to do is
> > make a call to
> >
> > servlet.getServletContext().setAttribute(key, object);
> >
> > and have the object stored in the application scope of all servers in
> > the cluster.
> 
> That surely would be desirable, but I don't know of any
> 'official', declarative means to achieve such behavior.
> Then: automatically synchronizing application scopes
> between several JVM instances would cause a lot of
> additional synchronization troubles - who determines
> what's the actual system state at a given point, e.g.
> if you update an application scope object (that is
> globally shared) on one server, and another user
> does likewise on a second one, what should be
> the end result? And so on.
> 
> > I know that EJBs were designed to serve this purpose; however, I
> > would like to bypass the overhead and complexities of EJBs.
> 
> EJBs live in the backend and are independant from
> the web tier. Looking at the problem from a 
> web tier view (which is what Struts is about),
> it should not make any difference whether the
> information comes directly from a database
> in the end or from an EJB tier in-between.
> That's transparent. Anyway, using EJBs
> won't solve your problem in the end, for
> it's an entirely web tier specific issue,
> and EJBs are not part of that.   
> 
> > If there isn't a switch that can be flipped in Tomcat, there might be
> > a way to create a lightweight JMS administration class to serve this
> > purpose.  Has anyone tried this?
> 
> There is no switch (remember the spoon
> boy in Matrix I ? :-). But the JMS idea is
> interesting. Never actually tried it, but
> of course, you can always handle
> application specific logic programma-
> tically, including using JMS for updating
> application scopes in a distributed 
> environment. But I never tried.
> 
> > If the answer to this question is RTFM, please send a link; I've
> > looked through the documentation and I can't seem to find a clear
> > reference.
> >
> > Thanks for your time and consideration.
> 
> Just some thoughts that came to me
> on early Easter Sunday :-) Let's better
> say: night; it's 2:16 local time here. So
> I should better go to bed.
> 
> > Mike
> 
> HTH,
> -- Chris.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 




__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: [OT] Clustering Application Scope Objects

2004-04-10 Thread Christian Bollmeyer
On Saturday 10 April 2004 21:48, Mike Duffy wrote:

Hi,

> I've read documentation for The Tomcat 5 Servlet/JSP Container:
> Clustering/Session Replication HOW-TO
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html
>
> I understand clustering for individual user sessions.  Are there any
> correlated methods for clustering application scope objects?

AFAIK there's nothing in the Servlet API specifications in this
direction. Sessions may be swapped in and out by several
different means (serialization or database), but application
scope information is kept individually for each JVM.

> The J2EE API for the Interface ServletContext states, "In the case of
> a web application marked "distributed" in its deployment descriptor,
> there will be one context instance for each virtual machine. In this
> situation, the context cannot be used as a location to share global
> information (because the information won't be truly global). Use an
> external resource like a database instead."

Yes. But then, it makes no difference whether your application
is marked as 'distributable' or not when considering application
scope objects. Application scope is always limited to a single
JVM. 'Distributed' is about sessions only.

> Rather than use a database, what I would like to be able to do is
> make a call to
>
> servlet.getServletContext().setAttribute(key, object);
>
> and have the object stored in the application scope of all servers in
> the cluster.

That surely would be desirable, but I don't know of any
'official', declarative means to achieve such behavior.
Then: automatically synchronizing application scopes
between several JVM instances would cause a lot of
additional synchronization troubles - who determines
what's the actual system state at a given point, e.g.
if you update an application scope object (that is
globally shared) on one server, and another user
does likewise on a second one, what should be
the end result? And so on.

> I know that EJBs were designed to serve this purpose; however, I
> would like to bypass the overhead and complexities of EJBs.

EJBs live in the backend and are independant from
the web tier. Looking at the problem from a 
web tier view (which is what Struts is about),
it should not make any difference whether the
information comes directly from a database
in the end or from an EJB tier in-between.
That's transparent. Anyway, using EJBs
won't solve your problem in the end, for
it's an entirely web tier specific issue,
and EJBs are not part of that.   

> If there isn't a switch that can be flipped in Tomcat, there might be
> a way to create a lightweight JMS administration class to serve this
> purpose.  Has anyone tried this?

There is no switch (remember the spoon
boy in Matrix I ? :-). But the JMS idea is
interesting. Never actually tried it, but
of course, you can always handle
application specific logic programma-
tically, including using JMS for updating
application scopes in a distributed 
environment. But I never tried.

> If the answer to this question is RTFM, please send a link; I've
> looked through the documentation and I can't seem to find a clear
> reference.
>
> Thanks for your time and consideration.

Just some thoughts that came to me
on early Easter Sunday :-) Let's better
say: night; it's 2:16 local time here. So
I should better go to bed.

> Mike

HTH,
-- Chris.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]