Caching

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Caching

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:50 pm

by Anonymous >> Mon, 5 Apr 2004 23:21:38 GMT

We continue to run into problems with users running thin client (v6) not seeing the latest information on the server. To the point I have to tell users to log out of Jade and log back in to clear their cache so they can print an invoice or run a query listing the latest transactions. Typically a server app has updated some data but the users don't see the change or new data until they log off?

Is there an ini file setting or something I can set so users always get information from the server and the latest data rather than just looking in their local cache file for data?? And I don't want to have to reprogram all the necessary access points to tell the program to go to the server and look for data when it should by default??

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Caching

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:50 pm

by cnwjhp1 >> Tue, 6 Apr 2004 1:30:54 GMT

In Jade 6, set

[JadeServer]
AutomaticCacheCoherencyDefault=true
AutomaticCacheCoherency=ServerDefault

[JadeClient]
AutomaticCacheCoherency=ServerDefault

In Jade 5, you have to do it yourself, eg a separate app running in each node that uses beginClassNotification to receive notification of changes. Hopefully you are on Jade 6.

Cheers,
John P

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Caching

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:50 pm

by allistar >> Tue, 6 Apr 2004 9:44:52 GMT

I asked Jade Support a while ago to explain exactly how this new mechanism works but they were unable to give me a satisfactory answer.

Does anyone here know? I am interested mainly in the overhead this mechanism incurs.

Is a notification sent to each node when an object is updated, or when a node accesses an object in its cache does it make a trip to the server to make sure it is the latest edition? If not then how else does it do it?

Thanks,
Allistar.

------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst allistar@silvermoon.co.nz
Auckland, NEW ZEALAND

Silvermoon Software
Specialising in JADE development and consulting
Visit us at: http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at: www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Caching

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:50 pm

by cnwjhp1 >> Wed, 7 Apr 2004 4:16:07 GMT
Is [A] a notification sent to each node when an object is updated, or when a node accesses an object in its cache does it make a trip to the server to make sure it is the latest edition? If not then how else does it do it?

[A] describes the CacheSyncer-type solution I alluded to. It is characterised by lots of excess notifications that impose a background asynchronous cpu load on the system. The bulk of my experience is with this. In my experience the background load is rarely significant, even though most notifications are excess.

is what you get when you use resynchObject all over the place. This slows response times by going to the server all the time, in the critical path of the transaction.

As I understand it, Jade 6 does an optimistion of [A], sending notifications to nodes as a result of updates, but only sending to the nodes that may actually have the object in question in cache. I have seen problem situations where millions of notifications are sent to user-written CacheSyncers, when most of the nodes contained no objects of the classes being updated. The optimisation avoids that. I don't know all the details of the optimisation, but if you current use CacheSyncers I would expect the new auto mechanism to be faster. For one thing, the sysNotification method is not called. I used one of our systems to test the integrity of AutomaticCacheCoherency (it was flawless by the way, and the test was severe). Using AutomaticCacheCoherency the total test used 3% less cpu than before. I was surprised there was that much improvement, as I didn't think the test did that many updates, and the CacheSyncers were already pretty well targetted to reduce notifications. In other real-life (problem) cases I have
seen I would expect well over 50% reduction in cpu, but normally the improvement would be small.

It's easy enough to test, if you can simulate a workload.

Cheers,
John P

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Caching

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:50 pm

by allistar >> Thu, 8 Apr 2004 10:03:47 GMT

Thanks for the info John. We use a combination of [A] and in our applications, with the understanding that neither of them are ideal. Database updating always maintains object consistency by locking objects before using them, so we are safe there anyway. Once we move our product suites to JADE 6 I'll definitely be implementing this feature and scrapping our current class notification mechanism.

Thanks again,
Allistar.
--
------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst allistar@silvermoon.co.nz
Auckland, NEW ZEALAND

Silvermoon Software
Specialising in JADE development and consulting
Visit us at: http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at: www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Caching

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:50 pm

by Patwos >> Tue, 6 Apr 2004 9:54:40 GMT

John has already advised you how to enable the new automatic cache coherency settings to keep the AppServer cache up to date.

However, I thought it worth mentioning that restarting a thin client connection will not clear a persistent object cache. Only Nodes have a persistent object cache so when that thin client reconnects, assuming it reconnects to the same AppServer, it will still have the same potentially out of date objects in that AppServer's persistent object cache - barring of course any objects that have been refreshed or dropped from cache by way of other activity in that AppServer Node.

Pat.


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 9 guests