Hello!

07.01.2018, 07:21, "Chris Double" <[email protected]>:
> On Sat, Jan 6, 2018 at 1:18 PM, Alexander Ilin <[email protected]> wrote:
>>  It seems that I overloaded the system somehow, but I don't see me doing 
>> anything illegal. Can you guys help me figure out what's going on?
>
> I suspect you are overloading the network stack on your machine since
> you are sending data as fast as possible and receiving it as fast as
> possible. Maybe the sender is getting ahead of the receiver and
> queuing more data in the network stack over time. Try adding a delay
> in the sender and see if that improves things.

Thank you for the suggestion!

OK, may be the sender was getting ahead of the receiver and overflooded the 
network stack buffers in the previous example. (I would have expected a 
different error message text in that case, but maybe that's what you get.) Here 
is a modified version of the same code, this time using send-synchronous and 
reply-synchronous. There is no way to overflood the network buffers in this 
code, because the two processes are moving in lockstep, exchanging one message 
at a time and waiting for the other to respond before sending anything.

Factor instance 1 (codename "Blackhole"):

USING: concurrency.distributed concurrency.messaging io.servers threads ;
9010 local-server start-node [
    [ receive t swap reply-synchronous t ] loop
] "black-hole" [ spawn ] keep register-remote-thread

Factor instance 2 (codename "Pulsar"):

USING: concurrency.distributed concurrency.messaging io.servers ;
9011 local-server start-node ! a port to receive synchronous replies
9010 local-server "black-hole" <remote-thread>
[ f swap send-synchronous drop t ] curry loop

Unfortunately, the resulting behavior is the same. For about 14 seconds both 
instances run at 100% CPU, then both run at about 50% CPU, and after 60 seconds 
from the experiment start the same error string is thrown by the Pulsar:
"You were not connected because a duplicate name exists on the network. If 
joining a domain, go to System in Control Panel to change the computer name and 
try again. If joining a workgroup, choose another workgroup name."

So, it doesn't seem to be a runaway buffer issue, unless Factor does something 
completely wrong, like peeking in the buffer and never removing messages from 
it.

---=====--- 
 Александр

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to