[Design of JBossCache] - Re: POJOization of config elements
by manik.surtani@jboss.com
Re: #1, as Scott suggested, you shouldn't need a PropertyEditor for Enums with the MC.
And Re: #3:
anonymous wrote :
|
|
| 3) Eviction configuration naming. The Pojo configuration looks like this:
|
| class EvictionConfig -- top level object. Configure your default eviction policy here, plus the interval for the eviction thread. Also takes a list of...
|
| class EvictionRegionConfig -- one per region. Configure the Fqn here, plus the class name of the EvictionPolicy (if you want to override the overall default). Also takes an impl of....
|
| interface EvictionConfiguration. the type-specific config for the EvictionPolicy.
|
| Couple problems here. First "EvictionConfiguration" would be better named "EvictionPolicyConfig", since its a config for a specific policy. But, that interface already exists in 1.4, so changing that name will break any existing custom impls. Don't know if we care about that. Second, there's already an unused interface named EvictionPolicyConfig, along with a DefaultEvictionPolicyConfig impl. That code is unused; looks like it was meant more as a top-level config object. We should drop that code after ensuring that any design ideas from it get picked up in the new stuff.
|
|
|
Yes, this stuff needs a bit of cleaning up. I suggest:
1) Leave EvictionConfiguration as it is.
2) EvictionPolicyConfig extends EvictionConfiguration, and internally we use EvictionPolicyConfig. We also document EvictionPolicyConfig and suggest that people use this, giving us a migration path.
3) Clean up on the unused code around here.
4) Remove the now redundant EvictionPolicyClass attribute - as this is now set as a part of a Region.
What do you think? I don't mind removing EvictionConfiguration altogether and breaking 1.4.0 compat as we're doing this in other areas anyway, but we aren't changing that much in the eviction policies so I'm not sure about this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980308#3980308
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980308
19 years, 5 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Messaging and Remoting
by timfox
Another thing to bear in mind with the proposed API.
If you have a method write(byte[] byte), then when used with a non blocking implementation this method might return after having written only a partial number of the bytes.
A similar reasoning applies to reads too.
This is what non blocking is all about. A blocking implementation would block until all the bytes had been written. This preventing the thread neing used for anything else while the blocking is occurring.
This means the semantics of the API differ depending on whether the actual implementation is blocking or non blocking.
This also means it's going to be up to the application to piece together requests and responses. This is where most of the difficulty in a non blocking approach comes in.
Trying to get the same API to cope with both approaches strikes me as somewhat analagous to the medieval alchemists trying to turn lead into gold.
It seems to me that our biggest issue is getting an implementation up and running. So far we haven't even got the interface sorted.
At the end of the day our end user won't give two hoots what our internal API looks like, but they will care that our performance sucks.
As I've said before, I could probably knock something up in MINA in a few weeks. Considering we only have just over 4 weeks to have this fully implemented, I think this is our only feasible option.
After that, we philosophise as much as we want about how to retrofit that in remoting.
But please please let's not try and write a new non blocking framework - let's not go down the "Not invented here" path. There are already tried and tested frameworks out there.
Let's get something working, and think about how this nicely fits into a new remoting api later when we have the luxury of time.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980273#3980273
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980273
19 years, 5 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Messaging and Remoting
by timfox
"ovidiu.feodorov(a)jboss.com" wrote :
| Where exactly did you see the word "stream" in the Remoting API extension document?
|
Why are you presuming I was referring to your posts? I was answering one of Clebert's posts where he *did* propose using streams.
ovidiu.feodorov(a)jboss.com wrote :
| The memory allocated when creating a direct buffer is outside of the JVM heap. The allocation is done through native methods, and it's likely to be significantly more expensive than creating non-direct buffers.
|
| I am not saying that we shouldn't use ByteBuffers for the low-level access API, I am saying that we should be very careful how we handle them, and what kind of buffers we pass around, so the drawbacks don't outweigh the speed advantages obtained by having I/O devices writing directly in the memory areas managed by direct buffers.
|
Are suggesting we preclude people from using direct byte buffers?
As far as I am concerned it is up to the user to use the API properly. We shouldn't prevent them doing high performance stuff because we thing they're a bit stupid and might make mistakes.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980269#3980269
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980269
19 years, 5 months