On Mon, Jan 10, 2011 at 10:11 AM, Udayanga Wickramasinghe <udaya...@wso2.com
> wrote:

> Hi devs,
> i think it is better we do $subject for Synapse . There is already a cache
> implementation for synapse which store and manage endpoints, remote entries
> ,etc. However the problem is all cache related functions are currently done
> in Synapse configuration and Registry,etc  modules, which is not scalable
> (and difficult to maintain).


Why not? It does a pretty good job at caching configuration artifacts at the
moment. Also it can be easily accessed through the configuration language
(using keys) and the Synapse extension APIs (synCtx#getEntry).

I admit that it is not perfect. But I don't see a strong enough case to
completely get rid of it and come up with a new impl :(

Thanks,
Hiranya



> I suggest , we separate the cache functionality into a different module.IMO
> that would allow us to to extend current cache functionality as well (ie:-
> prefetch and cache certain entries at startup for possible performance gain
> ,etc).
> API i am suggesting has the following,
> *Cache <Interface>*
> #insert(String key,Cacheable cachedObject,CacheConstraint constraint);
> #insert(String key,Cacheable cachedObject);
> #Cacheable getCachedObject(String key);
> #long getGlobalCacheDuration();
> *
> Cacheable <interface>*
> #Object getValue();
> #String getKey();
> #boolean isExpired();
> #clearCache();
> #long getVersion();
> #long getExpiryTime();
> ....
> et*c
> *(i think we could easily extend current Synapse Entry class [which is the
> object currently used for cache] to implement Cacheable interface )
> *
>
> CacheConstraint* *<interface>*
> boolean evaluate(Cacheable cachedObj)
>
> We could also include a cache.xml construct to configure this cache at
> startup (ie:-cache duration , cache providers , prefetching params , etc) .
> Really appreciate  thoughts of you all , regarding this. thnx in advance.
>
> Regards,
> Udayanga
>
> --
> *Udayanga Wickramasinghe*
> Software Engineer; WSO2 Inc.; http://wso2.com,
> *email: **udaya...@wso2.com* <udayan...@wso2.com>* cell: +94 (77) 983-4365
> blog: **http://udayangawiki.blogspot.com*<http://udayangawiki.blogspot.com/>
> *
> twitter: **http://twitter.com/udayanga_wick*<http://twitter.com/udayanga_wick>
> *
> *
>



-- 
Hiranya Jayathilaka
Senior Software Engineer;
WSO2 Inc.;  http://wso2.org
E-mail: hira...@wso2.com;  Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com

Reply via email to