ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Reload Cache

Post new topic  Reply to topic
 Reload Cache « View previous topic :: View next topic » 
Author Message
nukalas2010
PostPosted: Tue Jul 03, 2012 8:59 pm    Post subject: Reload Cache Reply with quote

Master

Joined: 04 Oct 2010
Posts: 220
Location: Somewhere in the World....

Hi All,
Currenlty in one of our main flow we get the cache by trigger a refresh of the shared row within an ATOMIC statement.... if we need the values to be constant for the duration of the flow, copy them from the shared area to a private (non shared) area using the ATOMIC statement and then reading from the private area.

if we had done any database changes means adding a new row, column etc. we are reloading execution group where the flow deployed. And the changes getting affected in the cache.

Is there any other way to get the updated records in the cache without restarting execution group...????

Thanks in Advance..
Back to top
View user's profile Send private message
nukalas2010
PostPosted: Wed Jul 04, 2012 3:28 am    Post subject: Reply with quote

Master

Joined: 04 Oct 2010
Posts: 220
Location: Somewhere in the World....

Can anyone(vitor, lance, mgk, mqjeff, fjsiper, rekaarm....) throw some light on this ???
Back to top
View user's profile Send private message
McueMart
PostPosted: Wed Jul 04, 2012 3:38 am    Post subject: Reply with quote

Chevalier

Joined: 29 Nov 2011
Posts: 490
Location: UK...somewhere

Normally you will use some kind of Cache update event (potentially a message arriving on a particular input queue) which will identify that your cache is stale and will trigger for it to be updated with current data.

This could also be performed with a timer whereby every X seconds your cache is marked as stale - and the next attempt at accessing the cache causes it to be refreshed.

These seem quite basic ideas. Maybe i'm not fully understanding your problem.
Back to top
View user's profile Send private message
kash3338
PostPosted: Wed Jul 04, 2012 4:02 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

You can have a UDP property to set the time (some x hrs) for which you need to reload the cache (which actually is to hit the DB again and load the data in your SHARED variable). Put your ATOMIC block of code inside a condition to check if you have exceeded the 'x' hours.
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Jul 04, 2012 10:58 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

kash3338 wrote:
You can have a UDP property to set the time (some x hrs) for which you need to reload the cache (which actually is to hit the DB again and load the data in your SHARED variable). Put your ATOMIC block of code inside a condition to check if you have exceeded the 'x' hours.


McueMart wrote:
Normally you will use some kind of Cache update event (potentially a message arriving on a particular input queue) which will identify that your cache is stale and will trigger for it to be updated with current data.

This could also be performed with a timer whereby every X seconds your cache is marked as stale - and the next attempt at accessing the cache causes it to be refreshed.

These seem quite basic ideas. Maybe i'm not fully understanding your problem.



You could even just set a flag in the database that holds the cache, and each time through the flow, you check if it's true. If it's true, you reset it to false and reload the cache. Then you make sure all your processes to update the database also set the flag to true.
Back to top
View user's profile Send private message
Esa
PostPosted: Thu Jul 05, 2012 12:13 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Consider updating the cache in a way that does not directly overwrite the cache or copy the contents of the cache to a temporary location before the update. So that you can copy them back if the update was not successful. Then the application can continue to run with the cached values even if the database connection is down.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Jul 05, 2012 5:22 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

I would move your cache into a more robust interface, like solidDb. If your poor, then Singleton.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Reload Cache
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.