If the data is infrequently changed and accessed often, your application could 
probably benefit from caching.  It depends, in part, on how much data we are 
talking about and how costly it is to retrieve.  . . .   If you store it 
locally and you want to make sure that different local caches are updated when 
changes are made, then using a remote cache to broadcast the updates is an 
option.  You could also use the lateral cache to broadcast changes.  If it's ok 
for the data to be somewhat out of synch, then you could simply set the 
expiration time low.  . . .

Aaron

--- On Tue, 2/23/10, debussy007 <debussy...@gmail.com> wrote:

> From: debussy007 <debussy...@gmail.com>
> Subject: Cache MySQL data ?
> To: jcs-users@jakarta.apache.org
> Date: Tuesday, February 23, 2010, 3:48 AM
> 
> Hi,
> 
> I would like to know if JCS would speed up my application.
> I describe very
> shortly the application:
> 
> The application consists of multiple servers listening for
> messages
> (Strings) received through Sockets. Each message is
> processed by separate
> tasks (Threads) managed in a ThreadPool. There may be more
> than 1000 of
> messages in second per server, so that's more than
> thousands of tasks
> queuing in the ThreadPool and I want those to be executed
> as fast as
> possible, and some of them have to connect to a MySQL DB,
> through JDBC. The
> data that needs to be read from MySQL is infrequently
> changed and it is
> updated by a website in PHP.
> 
> Questions:
> 
> * Is it a good idea here to use JCS to cache the MySQL data
> instead of
> accesing them each time using JDBC ? I am not sure if a
> remote cache (as
> there are multiple servers accessing it should thus be
> remote) will be
> faster then a MySQL connection and query. If so, who should
> store the data
> in JCS ?
> 
> * As the MySQL data is updated by a separate application
> (in this case, a
> php website), how should I update the cache so that the
> servers have the
> latest updates ?
> 
> Thank you for any help.
> -- 
> View this message in context: 
> http://old.nabble.com/Cache-MySQL-data---tp27702117p27702117.html
> Sent from the JCS - Users mailing list archive at
> Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jcs-users-unsubscr...@jakarta.apache.org
> For additional commands, e-mail: jcs-users-h...@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jcs-users-h...@jakarta.apache.org

Reply via email to