[Design of JBossCache] - Re: PojoCache uses a special node factory
by ben.wang@jboss.com
This is interesting proposal, Brian. :-)
But I am still pondering will it really help. I have been grapling with this problem for a while now since I encountered this in the "stress" test env.
Basically, in release 2.0, since we move to the flat-space approach as all the real POJO attachment happens at "__JBossInternal__" node. E.g., we will store the real POJO under, say, "__JBossInterna__/e4xx99ssjswi" node.
This imposes the fqn "__JBossInternal__" as the bottleneck as whenever I need to map another POJO, I will need to obtain a WL on "__JBossInternal__" first. And note that WL is needed for both attach and detach (a la, remove) as well.
So question is what options that we have to improve the concurrency while maintaining the correctness? I am finding not a lot, other than using the Region concept to improve it somewhat.
Can a specialized Node for "__JBossInternal__" help? During the creation and removal of child node, actually I can forgo the interceptor chain and just rely on the Node ConcurrentHashMap to provide synchonization. But I will run into problem when I need to rollback either attach or detach operations (unless I still go thru the interceptor stack).
Any thought?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999350#3999350
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999350
19 years, 3 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Failover analysis
by ovidiu.feodorov@jboss.com
Even if we keep a single valve instance per connection, I see no reason to involve remotingConnection at such low level, as you do in
| JMSRemotingConnection remotingConnection = null;
|
| try
| {
| valve.enter();
|
| // it's important to only retrieve the remotingConnection while inside the Valve, as we
| // guarantee that no failover has happened yet
| remotingConnection = connectionState.getRemotingConnection();
| return invocation.invokeNext();
| }
| catch (CannotConnectException e)
| {
| log.warn("We got a CannotConnectionException and we are trying a failover", e);
| ((ConnectionDelegate)connectionState.getDelegate()).performFailover(remotingConnection);
| return invocation.invokeNext();
|
| }
| catch (IOException e)
| {
| log.warn("We got an IOException and we are trying a failover", e);
| ((ConnectionDelegate)connectionState.getDelegate()).performFailover(remotingConnection);
| return invocation.invokeNext();
| }
Why don't we just message the connection: "there's failure, deal with it!".
The connection has access to the proper remoting connection instance, why does it need to receive as an argument of the call?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999282#3999282
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999282
19 years, 3 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Failover analysis
by ovidiu.feodorov@jboss.com
Clebert wrote :
| Ovidiu on Wiki Page wrote : If there are active threads traversing the valve at the moment when "close" command arrives, those threads must be interrupted and put to wait until the valve opens again
|
|
| There is no way to interrupt those threads, but on the event of a failure, all of the inflight invocations are going to fail at the same time, and all of them will capture the failure trying to close the valve at the same time.
|
Not in a portable way, I agree. But then I said that a possibility would be to close the valve regardless of any active thread, since the active threads will have no choice but fail anyway shortly.
For that, we need to make sure that:
1. We can close a valve with active threads traversing it
2. Once a valve is closed, it still handles correctly a downstream failure.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999276#3999276
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999276
19 years, 3 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Expiring/DLQ same message from multiple subscriptions
by genman
"timfox" wrote : If I send a message to a topic, and it ends up being delivered to n subscriptions on that topic, then the message expires, should the message be added to the expiry queue n times, one for each subscription, or only once?
|
JBossMQ creates an expired message for every subscription.
anonymous wrote :
| A more complex but related situation is for messages that have exceeded max delivery attempts.
|
| If a message is sent to a topic with n subscriptions. Then depending on how many times the client calls recover() or rollback() for one or more of the subscriptions, then the message could have exceeded max delivery attempts for some of the subscriptions but not with others.
|
| So the message needs to be added to the DLQ for some of the subscriptions, but not for others - how does this effect the subscriptions who have not exceeded max delivery attempts?
|
| Can we end up with a situation where the same message (same message id) is in the queue (dlq or expiry queue) multiple times? Would we get primary key violations in the database?
|
How I did it was to basically create a new message, which is mostly a copy of the original message, with additional headers indicating the original message ID, queue or topic name, and time of expiry. Then, JBossMQ would remove the old message and store the new message as a single DB operation.
You don't really need to worry about ID conflicts therefore.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999266#3999266
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999266
19 years, 3 months