[Design of JBossCache] - Re: Redesigning eviction
by andyredhead
Hi,
anonymous wrote :
| When is an eviction needed? When we're running out of memory. If memory was infinite, we wouldn't need evictions.
|
I'm not sure this is the only scenario where an object needs evicting. I think another criteria would be that an object should be evicted when its state has become "stale". Sometimes the logic around what makes "stale state" is going to be so application specific that there could be no expectation that the cache works it out, however there are plenty of occasions where a broad-brush approach such as "objects under this sub-branch get evicted after X minutes".
I have a couple of applications in production where JBossCache is used as a 2nd level cache for Hibernate and a time based eviction policy suits the application very well.
I guess the point of this post is:
1) Pointing out that memory consumption is not the only driver for eviction
2) A simple policy (with simple configuration) will suite "real world" applications just fine, making it overly complicated to do easy stuff would be painful for us "simple users" (well, me anyway ;)
3) As what's there kind of works, perhaps the effort that would go into this would be better off put into something else for now (like standardising the AOP framework for the pojo cache, even better to be standardising on the JBOss AOP framework so that those of us who are tied to using the appserver don't have to learn another AOP framework or worry about how a different AOP framework will interact with JBoss AOP thats already being used in other parts of their applications...)
Cheers,
Andy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065672#4065672
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065672
18 years, 8 months
[Design of JBoss ESB] - Re: Scheduling of services
by tfennelly
To add another twist to this....
What I was thinking re scheduling was to have a "ScheduledEventProvider" (e.g. <sevent-provider> that generates scheduled events). With that, you could then have a "ScheduledEventListener" (<sevent-listener>) which listens to the <sevent-provider>.
The <sevent-listener> could be configured with a MessageComposer in the same way all (or at least some) of the other listeners can be configured with a composer (org.jboss.soa.esb.listeners.message.MessageComposer impl) that does whatever is needed.
So, taking the WSListener as an example, it would actually be implemented as a MessageComposer that sits on a <sevent-listener> and when triggered (asked to "compose"), it goes off and makes the SOAP invocation and uses the result to compose the org.jboss.soa.esb.message.Message payload to be processed by the service pipeline (or whatever).
Just another option :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065671#4065671
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065671
18 years, 8 months