Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Shared cache best practices?

Shared cache best practices?

2004-01-09       - By Erik Beijnoff

 Back
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Ok. Nice to hear another opinion. It's always good to get another view
on things.

My problem in short was how to keep caches living on separate machines
in synch with each other, when the underlying data (database) may be
changed without the caches being aware of it. The response was mostly to
redesign my implementation to use Entity Beans with a Facade that I
communicated with that in turned had single access to the database.

I myself had an idea of letting the caches register themselves in a
single location, and then handle invalidation requests from the updating
application server through HTTP or RMI whenever any of the application
servers updates the database.

I'm not sure how I will handle it, the implementation is a month or two
away, so I'll think about it until then. What you describe may be
applicable. We'll see.

Regards Erik Beijnoff

-- --Ursprungligt meddelande-- --
Fr�n: A mailing list for Java(tm) 2 Platform, Enterprise Edition
[mailto:J2EE-INTEREST@(protected)] F�r Steven Warren
Skickat: den 8 januari 2004 18:47
Till: J2EE-INTEREST@(protected)
�mne: Re: Shared cache best practices?


Entity beans are not really a good solution for any situation and I
think should be culled from the herd of J2EE. I don't recommend you go
down that path as it will not likely give you good performance,
scalability, or reduced complexity. I have a large CMP Entity Bean
application (luckily successful) and I am warning you away from this
approach.

I didn't really hear enough about your situation to suggest a good
caching mechanism. The approach I took was to front my EJB calls with a
wrapper who returns cached data if the data has not been invalidated,
when data is posted, objects in the cache are invalidated via a
notification to each invalidated cached object (objects register to be
notified when they are put in the cache). But again, I don't know if
this is applicable to your situation.

Regards
Steve

-- --Original Message-- --
From: A mailing list for Java(tm) 2 Platform, Enterprise Edition
[mailto:J2EE-INTEREST@(protected)] On Behalf Of Erik Beijnoff
Sent: Thursday, January 08, 2004 12:38 AM
To: J2EE-INTEREST@(protected)
Subject: Re: Shared cache best practices?


Thanks for the responses. You've been verry helpful. I've gotten some
alternative approaches to think of it, and those of you who have
answered seems to lean towards the Entity Beans approach.

> Depending on your container, you may get automatic invalidation for
free -  
> by using the appropriate "commit option" (without needing JMS).  
> This is all assuming that all modifications to the tables that have
the cached data are being done through entity beans.
> In any event, it seems entity beans would be a good fit. You will need
to decide whether to
> keep your strategy of separate caches per web server (which will mean
an app server local to each web server).

For the moment I am not using Entity Beans or EJB. Just a domain model
made out of Pojos manipulated through a DB Peer, so it's really not an
app server for each web server, rather several web server with caches.
If I where to use Entity Beans, do they make a good joob replicating
over several servers, or can I expect the app server holding the Entity
Beans to become a bottleneck in the future?

Best regards Erik Beijnoff
========================================================================
=== To unsubscribe, send email to listserv@(protected) and include in
the body of the message "signoff J2EE-INTEREST". For general help, send
email to listserv@(protected) and include in the body of the message
"help".



========================================================================
=== To unsubscribe, send email to listserv@(protected) and include in
the body of the message "signoff J2EE-INTEREST". For general help, send
email to listserv@(protected) and include in the body of the message
"help".




===========================================================================
To unsubscribe, send email to listserv@(protected) and include in the body
of the message "signoff J2EE-INTEREST".  For general help, send email to
listserv@(protected) and include in the body of the message "help".


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:eXclaimer = "http://www.exclaimer.co.uk" xmlns:o =
"urn:schemas-microsoft-com:office:office"><HEAD><TITLE>Meddelande</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=207273114-09012004><FONT face=Arial color=#0000ff size=2>Ok.
Nice to hear another opinion. It's always good to get another view on
things.</FONT></SPAN></DIV>
<DIV><SPAN class=207273114-09012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=207273114-09012004><FONT face=Arial color=#0000ff size=2>My
problem in short was how to keep caches living on separate machines in synch
with each other, when the underlying data (database) may be changed without the
caches being aware of it. The response was mostly to redesign my implementation
to use Entity Beans with a Facade that I communicated with that in turned had
single access to the database.</FONT></SPAN></DIV>
<DIV><SPAN class=207273114-09012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=207273114-09012004><FONT face=Arial color=#0000ff size=2>I
myself had an idea of letting the caches register themselves in a single
location, and then handle invalidation requests from the updating application
server through HTTP or RMI whenever any of the application servers&nbsp;updates
the database.</FONT></SPAN></DIV>
<DIV><SPAN class=207273114-09012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=207273114-09012004><FONT face=Arial color=#0000ff size=2>I'm
not sure how I will handle it, the implementation is a month or two away, so
I'll think about it until then. What you describe may be applicable. We'll
see.</FONT></SPAN></DIV>
<DIV><SPAN class=207273114-09012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=207273114-09012004><FONT face=Arial color=#0000ff
size=2>Regards Erik Beijnoff</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
 <DIV></DIV>
 <DIV class=OutlookMessageHeader lang=sv dir=ltr align=left><FONT face=Tahoma
 size=2>-- --Ursprungligt meddelande-- --<BR><B>Fr�n:</B> A mailing list for
 Java(tm) 2 Platform, Enterprise Edition [mailto:J2EE-INTEREST@(protected)]
 <B>F�r </B>Steven Warren<BR><B>Skickat:</B> den 8 januari 2004
 18:47<BR><B>Till:</B> J2EE-INTEREST@(protected)<BR><B>�mne:</B> Re: Shared
 cache best practices?<BR><BR></FONT></DIV>
 <DIV><SPAN class=589413517-08012004><FONT face=Arial color=#0000ff
 size=2>Entity beans are not really a good solution for any situation and I
 think should be culled from the herd of J2EE. I don't recommend you go down
 that path as it will not likely give you good performance, scalability, or
 reduced complexity. I have a large CMP Entity Bean application (luckily
 successful) and I am warning you away from this approach.</FONT></SPAN></DIV>
 <DIV><SPAN class=589413517-08012004><FONT face=Arial color=#0000ff
 size=2></FONT></SPAN>&nbsp;</DIV>
 <DIV><SPAN class=589413517-08012004><FONT face=Arial color=#0000ff size=2>I
 didn't really hear enough about your situation to suggest a good caching
 mechanism. The approach I took was to front my EJB calls with a wrapper who
 returns cached data if the data has not been invalidated, when data is posted
,
 objects in the cache are&nbsp;invalidated via a notification to each
 invalidated cached object (objects register to be notified when they are put
 in the cache). But again, I don't know if this is applicable to your
 situation.</FONT></SPAN></DIV>
 <DIV><SPAN class=589413517-08012004><FONT face=Arial color=#0000ff
 size=2></FONT></SPAN>&nbsp;</DIV>
 <DIV><SPAN class=589413517-08012004><FONT face=Arial color=#0000ff
 size=2>Regards</FONT></SPAN></DIV>
 <DIV><SPAN class=589413517-08012004><FONT face=Arial color=#0000ff
 size=2>Steve</FONT></SPAN></DIV>
 <BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
   <DIV></DIV>
   <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
   face=Tahoma size=2>-- --Original Message-- --<BR><B>From:</B> A mailing
list
   for Java(tm) 2 Platform, Enterprise Edition
   [mailto:J2EE-INTEREST@(protected)] <B>On Behalf Of </B>Erik
   Beijnoff<BR><B>Sent:</B> Thursday, January 08, 2004 12:38 AM<BR><B>To:</B>
   J2EE-INTEREST@(protected)<BR><B>Subject:</B> Re: Shared cache best
   practices?<BR><BR></FONT></DIV>
   <DIV><SPAN class=722522316-07012004><FONT face="Lucida Sans Unicode"><FONT
   size=2><SPAN class=646363008-08012004><FONT face=Arial>Thanks for the
   responses. You've been verry helpful. I've gotten some alternative
   approaches to think of it, and those of you who have answered seems to lean
   towards the Entity Beans approach.</FONT></SPAN></FONT></FONT></SPAN></DIV>
   <DIV><SPAN class=722522316-07012004><FONT face="Lucida Sans Unicode"><FONT
   color=#0000ff><FONT size=2><SPAN class=646363008-08012004><FONT
   face=Arial></FONT></SPAN></FONT></FONT></FONT></SPAN>&nbsp;</DIV>
   <DIV><SPAN class=722522316-07012004><FONT face="Lucida Sans Unicode"><FONT
   color=#0000ff><FONT size=2><SPAN class=646363008-08012004><FONT
   face=Arial>&gt;&nbsp;</FONT></SPAN>Depending on your container, you may get
   automatic invalidation for free -&nbsp;<SPAN class=646363008-08012004><FONT
   face=Arial>&nbsp;</FONT></SPAN></FONT></FONT></FONT></SPAN></DIV>
   <DIV><SPAN class=722522316-07012004><FONT face="Lucida Sans Unicode"><FONT
   size=+0><FONT color=#0000ff><FONT size=2><SPAN
   class=646363008-08012004><FONT face=Arial>&gt;</FONT>&nbsp;</SPAN>by using
   the appropriate "commit option" (without needing JMS).&nbsp;<SPAN
   class=646363008-08012004><FONT
   face=Arial>&nbsp;</FONT></SPAN></FONT></FONT></FONT></FONT></SPAN></DIV>
   <DIV><SPAN class=722522316-07012004><FONT face="Lucida Sans Unicode"><FONT
   size=+0><FONT size=+0><FONT color=#0000ff><FONT size=2><SPAN
   class=646363008-08012004><FONT face=Arial>&gt;</FONT>&nbsp;</SPAN>This is
   all assuming that all modifications to the tables that have the cached data
   are being done through entity beans.<SPAN class=646363008-08012004><FONT
   face=Arial>&nbsp;</FONT></SPAN></FONT></FONT></FONT></FONT></FONT></SPAN><
/DIV>
   <DIV><SPAN class=722522316-07012004><FONT face="Lucida Sans Unicode"><FONT
   size=+0><FONT size=+0><FONT color=#0000ff><FONT size=2><SPAN
   class=646363008-08012004><SPAN class=722522316-07012004><FONT
   face="Lucida Sans Unicode" color=#0000ff size=2>&gt; In any event, it seems
   entity beans would be a good fit. You will need to decide whether to
   </FONT></SPAN></SPAN></FONT></FONT></FONT></FONT></FONT></SPAN></DIV>
   <DIV><SPAN class=722522316-07012004><FONT face="Lucida Sans Unicode"><FONT
   size=+0><FONT size=+0><FONT color=#0000ff><FONT size=2><SPAN
   class=646363008-08012004><SPAN class=722522316-07012004><FONT
   face="Lucida Sans Unicode" color=#0000ff size=2>&gt; keep your strategy of
   separate caches per web server (which will mean an app server local to each
   web
   server).</FONT></SPAN></SPAN></FONT></FONT></FONT></FONT></FONT></SPAN><
/DIV>
   <DIV><SPAN class=722522316-07012004><FONT face="Lucida Sans Unicode"><FONT
   size=+0><FONT size=+0><FONT color=#0000ff><FONT size=2><SPAN
   class=646363008-08012004></SPAN></FONT></FONT></FONT></FONT></FONT></SPAN>
&nbsp;</DIV>
   <DIV><SPAN class=722522316-07012004><FONT face="Lucida Sans Unicode"><FONT
   size=+0><FONT size=+0><FONT size=2><SPAN class=646363008-08012004><FONT
   face=Arial>For the moment I am not using Entity Beans&nbsp;or EJB.
   Just&nbsp;a domain model made out of Pojos&nbsp;manipulated through a DB
   Peer, so it's really not an app server for each web server, rather several
   web server with caches. If&nbsp;I where to use Entity Beans, do they make a
   good joob replicating over several servers, or can I expect the app server
   holding the Entity Beans to become a bottleneck in the
   future?</FONT></SPAN></FONT></FONT></FONT></FONT></SPAN></DIV>
   <DIV><SPAN class=722522316-07012004><FONT face="Lucida Sans Unicode"><FONT
   size=+0><FONT size=+0><FONT face=Arial size=2><SPAN
   class=646363008-08012004></SPAN></FONT></FONT></FONT></FONT></SPAN>&nbsp;<
/DIV>
   <DIV><SPAN class=722522316-07012004><FONT face="Lucida Sans Unicode"><FONT
   size=+0><FONT size=+0><FONT face=Arial size=2><SPAN
   class=646363008-08012004>Best regards Erik
   Beijnoff</SPAN></FONT></FONT></FONT></FONT></SPAN></DIV>===================
========================================================
   To unsubscribe, send email to listserv@(protected) and include in the body
   of the message "signoff J2EE-INTEREST". For general help, send email to
   listserv@(protected) and include in the body of the message "help".
   <P></P></BLOCKQUOTE>=======================================================
====================
 To unsubscribe, send email to listserv@(protected) and include in the body
of
 the message "signoff J2EE-INTEREST". For general help, send email to
 listserv@(protected) and include in the body of the message "help".
 <P></P></BLOCKQUOTE></BODY></HTML>
===========================================================================
To unsubscribe, send email to listserv@(protected) and include in the body
of the message "signoff J2EE-INTEREST".  For general help, send email to
listserv@(protected) and include in the body of the message "help".
<p>

©2008 junlu.com - Jax Systems, LLC, U.S.A.