pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Gagnon <dgagnon@siunik.com>
To: Arcadius A. <arcadius@menelic.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: implementing asynchronous notifications PLEASE CONFIRM MY
Date: Sun, 28 Aug 2005 15:51:53 -0400
Message-ID: <431215D9.8080805@siunik.com> (raw)
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>

Arcadius A. wrote:

> 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.


The business logic in the stored procedure are to much complex to know 
what gone be changed... at least I cannot be sure ... And that would be 
really complicated and cumbersome tring to guess... and frankly 
impossible... It's not an easy problem since the business logic is quite 
complicated .. .So lot of stored procedure and lot of SP that calls 
others SP.

Thanks for your help

Regards
/David





view thread (9+ messages)  latest in thread

Message-ID: <431215D9.8080805@siunik.com>
Permalink:  ../431215D9.8080805@siunik.com/
Also on:    postgresql.org/message-id/431215D9.8080805@siunik.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: dgagnon@siunik.com, arcadius@menelic.com
  Subject: Re: implementing asynchronous notifications PLEASE CONFIRM MY
  In-Reply-To: <431215D9.8080805@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> <4312822A.8030007@menelic.com> <431215D9.8080805@siunik.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