Le 22 mars 2013 23:35, "Emmanuel Lécharny" <[email protected]> a écrit : > > Le 3/22/13 10:51 PM, Jeff MAURY a écrit : > > On Fri, Mar 22, 2013 at 10:05 PM, Emmanuel Lecharny < [email protected]>wrote: > > > >> Le 22 mars 2013 21:26, "Jeff MAURY" <[email protected]> a écrit : > >>> Sorry, I missed my point. > >>> My intent is not to remove the session concept from the MINA UDP API but > >>> rather to say that trying to implement the concept of a virtual session > >>> like Emmanuel proposes seems to me that this will put some kind of > >> overhead > >>> in the MINA processing (and maybe memory leaks as well) for a use case > >> that > >>> I don't see being relevant except for 1% > >> What we call a 'session' here is just a container with a state. If the > >> application does not want to do anything with it, no pb. > >> > > What I try to explain is that you are implementing a session for a use case > > that I think is very specific. > > Yes, but this is the way the MINA framework is designed : we have > session in the IoHandler... > > Now, I wonder if we really need to manage Session instances when we have > incoming UDP messages : wouldn't it be better to propagate a static > Session instance that only contain the scoketAddress from the caller, > taken from a pool of session instances ? > > I guess that it's what you have in mind... >
Static session would make a lot of sense for broadcast or multicast. > > > >> Although it's for Mina a way to gather stats (nv msg sent, etc) and to > >> offer convenient methods (events). Nothing more. > >> > > In my opinion, you are mixing two different aspects. > > The statistics should be available globally for UDP, ie on the port level. > > Right. We can probably re-think the way it currently works. > > Thanks for the heads up. >
