Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiprocTCPBase Message Send Queuing? #26

Closed
kwokhongwong opened this issue Nov 22, 2016 · 5 comments
Closed

multiprocTCPBase Message Send Queuing? #26

kwokhongwong opened this issue Nov 22, 2016 · 5 comments
Assignees

Comments

@kwokhongwong
Copy link

Hi

First off thanks so much for creating a great library.

I have implemented an actor which is sending messages to another actor (multiprocTCPBase) every 10-15 secs.

I've noticed that the 1st message is always sent okay, immediately. But the subsequent messages appear to always queue (and never send).

In particular, in system.systemCommon.py, class systemCommonBase in method _send_intent(self, intent) - the 1st message send satisfies

self._finalTransmitPending.set_last_intent(
self._sCBStats,
intent.targetAddr,
sendAddr,
intent)

and so appears to send immediately.

Subsequent messages don't satify this (i.e. False is returned) and so appear to be queued.

I've tried to play with the settings in hysteresis.py without success.

I would also add that the message send is triggered by a Wakeup message, sent every 0.5 secs with the data consume from a deque populated by a thread running in the same process (thre thread populates the queue and sleeps for around 15 secs after successfully placing data on the queue).

Could you please provide some guidance on what I can do to ensure the messages do not queue up and are sent in a timely manner?

Apologies if I have overlooked the obvious.

Thanks in advance, Hong...

@kwokhongwong
Copy link
Author

Hi Again

I've just seen that this issue disappears if I increase the Wakeup interval e.g. to around 2 seconds. The prior setting I had was in fact 0.1 secs (not the 0.5 secs previously indicated).

Hong...

@kwquick
Copy link
Contributor

kwquick commented Nov 22, 2016

Hi Hong,

I'm glad you are finding Thespian useful, but it does sound like you are seeing something unexpected.

The set_last_intent call above is internally determining if it can send the new message or if the previous message is still being sent. Normally a message send should happen very quickly. There is some rate limiting applied by the RateThrottle in that same file, but it should be allowing a much higher rate than one message every 2 seconds; the hysteresis functionality is only used for system messages between convention admins and should not be impacting your test case.

I am concerned that perhaps the receiving actor is doing something that prevents it from interacting properly with the sending Actor. Can you provide any more information about what the receiver is doing, or alternatively provide a simple test case that reproduces your problem?

-Kevin

@kwokhongwong
Copy link
Author

Thanks Kevin for the quick response. I'll take another look over and will try to reproduce with a standalone test for you. Hong...

@kwquick
Copy link
Contributor

kwquick commented Dec 19, 2016

Hi Hong,

Just checking to see if you had a chance to look into this issue and if it's still a problem or if this issue should be closed.

-Kevin

@kwquick
Copy link
Contributor

kwquick commented Nov 8, 2017

Closing this issue for now. Please feel free to re-open or create another issue if you are still having trouble.

@kwquick kwquick closed this as completed Nov 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants