[Design the new POJO MicroContainer] - Re: Does ScopeKey need to maintain a sorted (in ScopeLevel.l
by smarlow@redhat.com
Internally, I started a second unordered collection in ScopeKey but haven't switched over the cases that need the ordered collection yet (for obvious reasons :).
Looking at the cases for ordered access to ScopeKey.scopes, I see the following methods that seem to need sorted access to ScopeKey.scopes collection.
1. The getParent() which returns a collection of Scopes (in sorted order). The parent seems to be all Scopes except the highest ScopeLevel entry (last value in ScopeKey.scopes collection). In my search for meaning, I will assert that the child value must always be the one with the highest ScopeLevel. I haven't yet come across any processing for the child only, so maybe there really isn't a "child" concept embedded into the code. If this was a Lisp list, I might almost mistake getParent as returning some sort of "cdr" (except from the tail instead of list head).
2. isParent(ScopeKey key), returns true if the passed key's Scopes match the "this" Scopes (ignoring the last entry, which I will again call the child for no good reason).
3. getScopes() returns immutable collection of the Scopes (in sorted order). One caller to getScopes(), that might need a sorted result is in DefaultScopeBuilder.initMetaDataRetrieval which builds a collection of metadata in the lowest to highest ScopeLevel order. AbstractScopeInfo also depends on a sorted result from getScopes(). FuzzyMetaDataRepositoryVisitor also depends on getScopes returning a sorted result.
There could be other dependencies (on a sorted result) that I missed as well.
It doesn't seem very difficult to eliminate the get/is Parent depenency on a sorted scopes collection as we always know the "maxScopeLevel" which identifies the "child" entry (I'm still not sure if it is correct to refer to the last entry as the "child" ;). Given an unordered collection, getParent, returns all entries minus the "maxScopeLevel" and the same can be used for isParent checking.
This leaves getScopes(), I'll wait to hear responses to this post before drilling further into getScopes().
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247911#4247911
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247911
16 years, 8 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Meaning of Paging Max Global Size
by clebert.suconic@jboss.com
I'm creating this dev post as a continuation of the user's post about paging and management destinations:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=159288
What should be the meaning of paging-global-max-size?
Current definition: "The global max size is the max memory the server will be able to accept. After the limit was reach, the server won't accept anything protecting itself from Out of Memory Exceptions."
But this seems too much, as when a single destinations puts the server into global page, this will mean... nothing else gets inside the server.
My expectation was the user configuring page-max-size individually at address level, and having the global-max-size as an *extra* protection.
If we want to allow routing when in global-page-mode, we will need to change the global-max-size definition a little bit.
New definition?: The global max size is the limit where all the destinations enter into page mode. And any destination will have at least a minimal limit of data in memory equivalent to 1 page. the default will be 10MiB).
This will also mean: We won't be able to protect the server from OMEs. If the user created a huge ammount of addresses (say.... 1000), each address will have at least 10MiB (pre-configured) in memory.
Any thoughts?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247881#4247881
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247881
16 years, 8 months