Hi

 

I need some kind of bandwidth throttling for the P2P-application I'm
developing with Mina. I've been looking at BitTorrent's throttling
mechanism, the so called choking algorithm
(http://wiki.theory.org/BitTorrentSpecification#Choking_and_Optimistic_U
nchoking
<http://wiki.theory.org/BitTorrentSpecification%23Choking_and_Optimistic
_Unchoking> ) but without the "interested"-part, since that doesn't
apply for my application. I think it wouldn't be too hard to implement
this in Mina using the state machine (since the choking algorithm is
very much "state based"). 

 

However I'm still very new to Mina and I also feel like the throttling
should be implemented a bit earlier in the process than in the
state-machine (you want to drop-messages as early on as possible if you
are choked). Do you guys have any suggestions or directions on how I
should go about to implement this? Can I for instance access the state
in a filter and should therefore implement as a filter there instead? If
you would implement this how would you do?

 

When I've finished this I have no problem sharing it with you guys, if
you think it can be used in other applications as well.

 

Thank you in advance!

 

Kind Regards

Carl Hasselskog

The Royal Institute of Technology (KTH)

Stockholm, Sweden

[email protected]

Reply via email to