Am 10.06.2009 um 17:16 schrieb Damian Viano:

On Wed, Jun 10, 2009 at 03:06:59PM +0200, Alexander Malysh wrote:
here is a link to throttling branch:
        http://github.com/amalysh/kannel/tree/smpp-throttling
only smpp implemented for now.

Great, thanks for the link.

I see that you basically break out when you are over throughput[1], I see your concern now, since the thread for receiving is the same as the sender, so you just break out to keep processing incoming pdu. Makes sense, and this indeed breaks my assumption that the smsc implementations would have a thread for
sending and another one for receiving.

Unfortunately this is smsc-dependant, so maybe we could move this to a more generic api, and make the rule that the SMSCs MUST check that api (say... conn->over_throughput()?) and move the load setup/increase to the already
existing callbacks?.

I think, it's already enough abstracted in load object. Now it's SMSC dependent how to use it. So I don't think we need more api there but I'm open for a patch that would make it easier to implement
this in other smsc modules.


That way it's a bit more generic and we can implement
conn->sleep_for_throughput() for the smsc that need their sender thread to
sleep, or let the others (i.e. smpp) handle it accordingly.

Opinions about this approach?

[1] I didn't check the load object but I assume it account for load_increases
in the set interval, which would make sense.

Thanks,
Alex

Thanks your code, made your points a lot more clearer, I hope we can come up
with a better implementation of throughput for all kannel users.

   Damián Viano(Des).


Reply via email to