开发者

Which data structure to throttle outbound messages?

I need to send messages (the actual technology is irrelevant at this stage) while complying with a number of throttling constraints. Basically I have contraints that are related to the sender and to the destination, in terms of messages per second. I don't mind in enforcing the throttling while accepting the messages from the sender, while I do need to throttle them when sending out. I was thinking about priority queues, but maybe there开发者_StackOverflow中文版's a better advice.

Anyway, the application is multithreaded, written in C and running under Linux, if this matters.


Take a look at this question and the answers mentioned there:

Throttling method calls to M requests in N seconds

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜