pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Arcadius A. <arcadius@menelic.com>
To: David Gagnon <dgagnon@siunik.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: implementing asynchronous notifications PLEASE CONFIRM MY
Date: Sun, 28 Aug 2005 20:34:02 -0700
Message-ID: <4312822A.8030007@menelic.com> (raw)
In-Reply-To: <4311C6AB.1020607@siunik.com>
References: <Pine.LNX.4.44.0504110519590.13042-200000@ns.surfnonstop.com>
	<4265A05C.6050302@opencloud.com>
	<42667C72.9070708@siunik.com>
	<4266E296.6050105@opencloud.com>
	<4308AF3A.2070400@siunik.com>
	<43120302.9030509@menelic.com>
	<4311C6AB.1020607@siunik.com>

David Gagnon wrote:

> Hi ,
>
>   Thanks for your answer, see my answer below..
>
>> David Gagnon wrote:
>>
>>> Hi all,
>>
[...]

>>
>> However I do not know your exact requirement, if I were to solve such 
>> a problem, I would not try to put any overhead on the DB server; 
>> after all, the purpose of caching is to give a brake to the DBServer.
>>
>> In fact, the easiest way to have the cache in sync with the DB is to 
>> have a kind of Facade , a unique class, with static methods for 
>> reading/writing data for both the cache and the DB.
>>
>> Using a single class for reading/writing , you won't need the DB to 
>> notify  you of changes since all call go through your facade, that 
>> means that you know when things are being changed and can take action.
>>
>> However, your requirements my be different.
>>
>>
>> Regards. \
>
>
[...]

> The big problem is that when a user launch a stored procedure.. chance 
> are that he will consult the other data right after the completion of 
> the stored procedure.  If data have not been updated in the cache I 
> will display invalid data :-(
>
If the user is calling the SP from the same Java app , then , what I 
said before is still valid.
The method which calls the SP should clear/invalidate the cache .
So, the next time the user tries to view data, as the cache is 
empty/invalidated , new stuff should be loaded from the DB.


Regards.

Arcadius.



view thread (9+ messages)

Message-ID: <4312822A.8030007@menelic.com>
Permalink:  ../4312822A.8030007@menelic.com/
Also on:    postgresql.org/message-id/4312822A.8030007@menelic.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: arcadius@menelic.com, dgagnon@siunik.com
  Subject: Re: implementing asynchronous notifications PLEASE CONFIRM MY
  In-Reply-To: <4312822A.8030007@menelic.com>
  References: <Pine.LNX.4.44.0504110519590.13042-200000@ns.surfnonstop.com> <4265A05C.6050302@opencloud.com> <42667C72.9070708@siunik.com> <4266E296.6050105@opencloud.com> <4308AF3A.2070400@siunik.com> <43120302.9030509@menelic.com> <4311C6AB.1020607@siunik.com> <4312822A.8030007@menelic.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox