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 regarding two resources. If one
resource is available when the db is down and and other is not
available, it is not consistent from the users perspective, specially
when he can't choose to have caching from the registry APIs. If user
explicitly says in his program that caching is required then it is
consistent. But if it happens under the hood without user control
through APIs, it seems in-consistent.

Thanks,
Supun..

>
> On Fri, Apr 22, 2011 at 7:21 PM, Senaka Fernando <sen...@wso2.com> wrote:
>>
>> 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 out
>> earlier.
>>
>> Proper exceptions are thrown when there is a loss of DB connectivity, if a
>> programmer needs to figure a loss of DB-connectivity (you can check the
>> cause - which is a Throwable; of the exception that's thrown by the
>> registry). But, to me, this is an edge-case, and if there is such a
>> consistency requirement the cache can be disabled. By default, caching is
>> enabled, and the changes have been made to the registry.xml files found in
>> carbon core, and files used for testing in carbon components and also at
>> product-level.
>>
>> Thanks,
>> Senaka.
>>
>> On Fri, Apr 22, 2011 at 5:11 PM, Supun Kamburugamuva <su...@wso2.com>
>> wrote:
>>>
>>> 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 programmers perspective this is not
>>> consistent.
>>>
>>> Thanks,
>>> Supun..
>>>
>>> On Fri, Apr 22, 2011 at 4:58 PM, Afkham Azeez <az...@wso2.com> wrote:
>>> >
>>> >
>>> > 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.com>
>>> >> wrote:
>>> >>>
>>> >>>
>>> >>> 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 the ESB specific
>>> >>>> configurations. So I believe we have implemented something that
>>> >>>> should
>>> >>>> have being implemented at the application layer at the registry
>>> >>>> level.
>>> >>>>
>>> >>>> The correct way to implement this kind of functionalities in the
>>> >>>> registry is using an adapter kind of approach. If a user wants
>>> >>>> registry resource caching they can use a adapter to access the
>>> >>>> registry instead of direct access.
>>> >>>
>>> >>> Or we may introduce a mechanism to disable registry caching. In the
>>> >>> current implementation there is no way to disable registry caching.
>>> >>
>>> >> AFAIK Senaka did some changes recently and made registry caching
>>> >> configurable. Also with the default configuration registry caching is
>>> >> disabled.
>>> >
>>> > default should be caching enabled.
>>> >
>>> >>
>>> >> Thanks,
>>> >> Janaka
>>> >>>
>>> >>> Thanks,
>>> >>> Waruna
>>> >>>
>>> >>>>
>>> >>>> Thanks,
>>> >>>> Supun..
>>> >>>>
>>> >>>> On Fri, Apr 22, 2011 at 3:29 PM, Sumedha Rubasinghe
>>> >>>> <sume...@wso2.com>
>>> >>>> wrote:
>>> >>>> > 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 a cache. Is this the behavior of the
>>> >>>> >> registry?
>>> >>>> >>
>>> >>>> >> Thanks,
>>> >>>> >> --
>>> >>>> >> Supun Kamburugamuva
>>> >>>> >> Technical Lead &  Product Manager, WSO2 Inc.; http://wso2.com
>>> >>>> >> Member, Apache Software Foundation; http://www.apache.org
>>> >>>> >> WSO2 Inc.;  http://wso2.org
>>> >>>> >> E-mail: su...@wso2.com;  Mobile: +94 77 431 3585
>>> >>>> >> Blog: http://supunk.blogspot.com
>>> >>>> >> _______________________________________________
>>> >>>> >> Carbon-dev mailing list
>>> >>>> >> Carbon-dev@wso2.org
>>> >>>> >> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>> >>>> >
>>> >>>> >
>>> >>>> > _______________________________________________
>>> >>>> > Carbon-dev mailing list
>>> >>>> > Carbon-dev@wso2.org
>>> >>>> > http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>> >>>> >
>>> >>>> >
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>> --
>>> >>>> Supun Kamburugamuva
>>> >>>> Technical Lead &  Product Manager, WSO2 Inc.; http://wso2.com
>>> >>>> Member, Apache Software Foundation; http://www.apache.org
>>> >>>> WSO2 Inc.;  http://wso2.org
>>> >>>> E-mail: su...@wso2.com;  Mobile: +94 77 431 3585
>>> >>>> Blog: http://supunk.blogspot.com
>>> >>>> _______________________________________________
>>> >>>> Carbon-dev mailing list
>>> >>>> Carbon-dev@wso2.org
>>> >>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>> >>>
>>> >>>
>>> >>>
>>> >>> --
>>> >>>
>>> >>> -------------------------------------------------------------------------
>>> >>> Waruna Ranasinghe
>>> >>> Senior Software Engineer, WSO2
>>> >>>
>>> >>> Mobile: +94 724 318285
>>> >>> BLOG: http://warunapw.blogspot.com
>>> >>>
>>> >>> www.wso2.com - "Lean . Enterprise . Middleware"
>>> >>>
>>> >>> _______________________________________________
>>> >>> Carbon-dev mailing list
>>> >>> Carbon-dev@wso2.org
>>> >>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>> >>>
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Janaka Ranabahu
>>> >> Software Engineer
>>> >> WSO2 Inc.
>>> >> Mobile +94 718370861
>>> >> Email : jan...@wso2.com
>>> >> Blog : janakaranabahu.blogspot.com
>>> >>
>>> >> _______________________________________________
>>> >> Carbon-dev mailing list
>>> >> Carbon-dev@wso2.org
>>> >> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Afkham Azeez
>>> > Senior Software Architect & Senior Manager; WSO2, Inc.;
>>> > http://wso2.com,
>>> >
>>> > Member; Apache Software Foundation; http://www.apache.org/
>>> > email: az...@wso2.com cell: +94 77 3320919
>>> > blog: http://blog.afkham.org
>>> > twitter: http://twitter.com/afkham_azeez
>>> > linked-in: http://lk.linkedin.com/in/afkhamazeez
>>> >
>>> > Lean . Enterprise . Middleware
>>> >
>>> > _______________________________________________
>>> > Carbon-dev mailing list
>>> > Carbon-dev@wso2.org
>>> > http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Supun Kamburugamuva
>>> Technical Lead &  Product Manager, WSO2 Inc.; http://wso2.com
>>> Member, Apache Software Foundation; http://www.apache.org
>>> WSO2 Inc.;  http://wso2.org
>>> E-mail: su...@wso2.com;  Mobile: +94 77 431 3585
>>> Blog: http://supunk.blogspot.com
>>> _______________________________________________
>>> Carbon-dev mailing list
>>> Carbon-dev@wso2.org
>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>>
>> --
>> Senaka Fernando
>> Product Manager - WSO2 Governance Registry;
>> Associate Technical Lead; WSO2, Inc.; http://wso2.com
>> Member; Apache Software Foundation; http://apache.org
>>
>> E-mail: senaka AT wso2.com
>> P: +1 408 754 7388; ext: 51736; M: +94 77 322 1818
>> Linked-In: http://www.linkedin.com/in/senakafernando
>>
>> Lean . Enterprise . Middleware
>>
>>
>> _______________________________________________
>> Carbon-dev mailing list
>> Carbon-dev@wso2.org
>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>
>
>
> --
> Afkham Azeez
> Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com,
>
> Member; Apache Software Foundation; http://www.apache.org/
> email: az...@wso2.com cell: +94 77 3320919
> blog: http://blog.afkham.org
> twitter: http://twitter.com/afkham_azeez
> linked-in: http://lk.linkedin.com/in/afkhamazeez
>
> Lean . Enterprise . Middleware
>
> _______________________________________________
> Carbon-dev mailing list
> Carbon-dev@wso2.org
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>



-- 
Supun Kamburugamuva
Technical Lead &  Product Manager, WSO2 Inc.; http://wso2.com
Member, Apache Software Foundation; http://www.apache.org
WSO2 Inc.;  http://wso2.org
E-mail: su...@wso2.com;  Mobile: +94 77 431 3585
Blog: http://supunk.blogspot.com
_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to