[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Server side HA and failover
by clebert.suconic@jboss.com
I changed NodeAddressInfo a little bit. It now has ConnectionFactories for all the nodes on NodeAddressInfo. (Even I had to convert the factories to bytes before sending it to the cluster).
I had to do that because just the Locator is not enough to perform a connection creation.
I have also started creating a ClusteredConnectionFactory. So far I'm requiring a cluster to also have a regular connection Factory. ClusteredConnectionFactory will get already registered ConnectionFactories on ServerPeer and encapsulate them on a list that will work both as RoundRobbin Connectors and Failover in case of connection failure.
There are some issues I don't know how to solve yet... like what to do when a Server has multiple connectors. We will probably need two ClusteredConnectionFactory (one for each type of connector). (I will get the basic working first and worry about multiple datasources right after this).
Also.. We have at this point two PostOffices (queue/topic). To manage the Datasource we need only one. So, I will configure ClusteredDataSource to use Queue ClusteredPostOffice as we don't need to deal with both postOffices. (Let me know if there is any objection)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986705#3986705
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986705
19 years, 4 months
[Design of JBossCache] - TreeCacheProxyImpl.getChildren() ugliness
by genman
I've been taking a look at the AOP collections, in particular the performance -- or obvious lack of.
Under a profiler, I found out that List.size() works a bit more than probably necessary. It ends up calling, getChildren().size(), which does this sort of thing:
| public Set<Node> getChildren()
| {
| Map m = currentNode.getChildren();
| Set<Node> children = new HashSet<Node>(m.size());
| Iterator i = m.values().iterator();
| while (i.hasNext())
| {
| children.add(new TreeCacheProxyImpl(treeCache, (NodeImpl) i.next()));
| }
|
| return Collections.unmodifiableSet(children);
| }
|
Is there any particular approach that's being taken to hopefully improve this method's performance?
It seems fairly straightforward to simply have NodeImpl implement NodeSPI, but this requires the getChildren() return type to change.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986701#3986701
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986701
19 years, 4 months