[Carbon-dev] Does registry serves cached values even after the DB goes down?

2011-04-22 Thread Supun Kamburugamuva
I tried to shut down the registry database and access the registry resources. It seems, even though the database is down registry is serving the resources from a cache. Is this the behavior of the registry? Thanks, -- Supun Kamburugamuva Technical Lead  Product Manager, WSO2 Inc.;

Re: [Carbon-dev] Does registry serves cached values even after the DB goes down?

2011-04-22 Thread Sumedha Rubasinghe
How else would you expect a cache to behave? ;-) /sumedha On Fri, Apr 22, 2011 at 3:27 PM, Supun Kamburugamuva su...@wso2.com wrote: I tried to shut down the registry database and access the registry resources. It seems, even though the database is down registry is serving the resources from

Re: [Carbon-dev] Does registry serves cached values even after the DB goes down?

2011-04-22 Thread Supun Kamburugamuva
For the users of the registry, it is important to know weather registry database is down. For example we have the requirement of caching the resources at the ESB level and manage these caches according to the ESB specific configurations. So I believe we have implemented something that should have

Re: [Carbon-dev] Does registry serves cached values even after the DB goes down?

2011-04-22 Thread Waruna Ranasinghe
On Fri, Apr 22, 2011 at 3:39 PM, Supun Kamburugamuva su...@wso2.com wrote: For the users of the registry, it is important to know weather registry database is down. For example we have the requirement of caching the resources at theimplemtation ESB level and manage these caches according to

Re: [Carbon-dev] Does registry serves cached values even after the DB goes down?

2011-04-22 Thread Janaka Ranabahu
On Fri, Apr 22, 2011 at 3:47 PM, Waruna Ranasinghe war...@wso2.com wrote: On Fri, Apr 22, 2011 at 3:39 PM, Supun Kamburugamuva su...@wso2.comwrote: For the users of the registry, it is important to know weather registry database is down. For example we have the requirement of caching the

Re: [Carbon-dev] Does registry serves cached values even after the DB goes down?

2011-04-22 Thread Afkham Azeez
On Fri, Apr 22, 2011 at 4:24 PM, Janaka Ranabahu jan...@wso2.com wrote: On Fri, Apr 22, 2011 at 3:47 PM, Waruna Ranasinghe war...@wso2.comwrote: On Fri, Apr 22, 2011 at 3:39 PM, Supun Kamburugamuva su...@wso2.comwrote: For the users of the registry, it is important to know weather

Re: [Carbon-dev] Does registry serves cached values even after the DB goes down?

2011-04-22 Thread Supun Kamburugamuva
Having Caching for fail cases transparently from the user gives an in consistency. Lets say a user accessed a resource before the registry database failed. After the registry database has failed, user can access this particular resource but he may not be able to access another resource. From a

Re: [Carbon-dev] Does registry serves cached values even after the DB goes down?

2011-04-22 Thread Senaka Fernando
Hi Supun, From a Caching PoV, this is consistent. DB-loss can be momentary or pro-longed, but that's not a concern of a cache. And, the prime use-case of the cache is to make it possible to fetch cached resources instead of making DB-calls. I see no inconsistency in this model, as Sumedha pointed

Re: [Carbon-dev] Does registry serves cached values even after the DB goes down?

2011-04-22 Thread Afkham Azeez
Yes, it is consistent. The cache has a cache timeout, and as long as the items in the cache are fresh, regardless of the DB being available or not, it is correct to serve from the cache. On Fri, Apr 22, 2011 at 7:21 PM, Senaka Fernando sen...@wso2.com wrote: Hi Supun, From a Caching PoV, this

Re: [Carbon-dev] Does registry serves cached values even after the DB goes down?

2011-04-22 Thread Supun Kamburugamuva
On Fri, Apr 22, 2011 at 7:43 PM, Afkham Azeez az...@wso2.com wrote: Yes, it is consistent. The cache has a cache timeout, and as long as the items in the cache are fresh, regardless of the DB being available or not, it is correct to serve from the cache. The inconsistency I point out is

Re: [Carbon-dev] Does registry serves cached values even after the DB goes down?

2011-04-22 Thread Afkham Azeez
This is how any type of cache generally works. For example, a Web server proxy cache may serve requests from the cache, if the requested resources are available in the cache, but if a non-existent resource is requested, and the target server is down, the request would return an error to the client