Azure / DotNetty

DotNetty project – a port of netty, event-driven asynchronous network application framework
Other
4.09k stars 977 forks source link

AttributeKey #78

Closed g2InTheDesert closed 8 years ago

g2InTheDesert commented 8 years ago

AttributeKey is currently commented out in the Abstract and Server Bootstrap classes. Could someone please advise what is involved with implementing this feature? Thanks.

nayato commented 8 years ago

you would need to look closely at pair of interfaces in netty: AttributeMap and Attribute. There is the default implementation in DefaultAttributeMap.java. DefaultAttributeMap might be substituted with ConcurrentDictionary (GetOrAdd in particular for getting an attribute out of the dictionary) but performance might be better with the direct port of DefaultAttributeMap as access to attribute map usually is uncontended (yet still has to be synchronized), locking might be better suited for this; also memory footprint of ConcurrentDictionary might be unreasonable for the arbitrary property bag on a Channel.

g2InTheDesert commented 8 years ago

Max,

Sorry for the chat and this issue being posted. I am new to the community and would like to help, but I do not have C# skills.

I’m very well versed in Java and a can “convert” the classes, but there is much that I don’t know, which is why I am seeking guidance.

Thanks for any information you can provide.

Regards,

Gerard

On Mar 15, 2016, at 4:13 AM, Max Gortman notifications@github.com wrote:

you would need to look closely at pair of interfaces in netty: AttributeMap and Attribute. There is the default implementation in DefaultAttributeMap.java. DefaultAttributeMap might be substituted with ConcurrentDictionary (GetOrAdd in particular for getting an attribute out of the dictionary) but performance might be better with the direct port of DefaultAttributeMap as access to attribute map usually is uncontended (yet still has to be synchronized), locking might be better suited for this; also memory footprint of ConcurrentDictionary might be unreasonable for the arbitrary property bag on a Channel.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/Azure/DotNetty/issues/78#issuecomment-196753674 https://github.com/Azure/DotNetty/issues/78#issuecomment-196753674

nayato commented 8 years ago

FYI, working on it now