hi trusitn,

yes, it's similar to nagle ... however, i would prefer to handle this within 
the application layer to make it more idependent of the underlying os settings 
(which of course have to be taken into account). i will use mina to support 
external clients while my internal servers are connected via jgroups. in 
jgroups you are able to specify bundling (timeout/size triggered). this is 
quite handy. if your clients are only 'near-realtime' it is ok to send a max of 
lets say 3 bundled messages / sec. i could do it within my application layer, 
however i would prefer to have it in a lower layer. i did not find an out of 
the box solution in mina for this, basically
it is some kind of message queueing/buffering until a criteria is met.  maybe 
it is an interesting option for you to include in mina out of the box? i'm sure 
there are quite some people who would need this ... however, i admire 
components/frameworks which are clean, simple and to the point.

i will have a look at iofilter - is there any code fragment i can start with? 
considering that there may be a lot of clients (50k+) i would especially be 
interested in some kind of priority queue. while it is easy to send the data 
once the size limit is reached it could be demanding to implement an efficient 
way of handling the individual timemout's of thousands of outstanding message 
buffers.

i assume some efficient kind of such an alogrithm is implemented in your 'idle' 
functionality for IoSessions? how is this handled if there are lets say 50.000 
iosessions ... how do you determine efficiently for which sessions you have to 
call the idle function?

----- Original Message ----
From: Trustin Lee <[EMAIL PROTECTED]>
To: [email protected]
Sent: Tuesday, November 13, 2007 8:52:39 AM
Subject: Re: outbound message bundling possible?


Hi Horace,

On Nov 10, 2007 4:48 AM, Horace Pinker <[EMAIL PROTECTED]> wrote:
> i'm wondering if it is possible to use mina in a way so that outbound
 messages are bundled (ie max_bundle_size=4096 max_bundle_time=50(ms))
 so that messages are sent only if one of the bundle criteria is
 fulfilled?

I think it's very similar to what TCP Nagle's algorithm is doing.  Is
there any reason that you need another bundling?

Anyways, you can implement that feature using IoFilter very easily.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6






      
____________________________________________________________________________________
Get easy, one-click access to your favorites. 
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs 

Reply via email to