If you look at ``M\ remote-thread send``, it uses ``send-remote-message``
which opens a TCP connection using ``with-client``, which sends a message,
then closes the connection.

For a high-throughput messaging application, you would probably want to
re-use a TCP connections, or use UDP, and probably allow for out-of-order
messages since you could have different synchronous responses taking
different lengths of time from client to server to client.

I'm not surprised that a busy loop is causing problems because TCP
connections aren't intended to be spammed like that without causing
resource constraints and potentially exposing some bugs in handling those
situations.

The code is 10's of lines to implement concurrency.distributed so I'm sure
you could modify it in minor ways to be specific to your application and
maybe useful to contribute back.

If you need to get more familiar with network programming, I recommend
Beej's guide:

https://beej.us/guide/bgnet/

Best,
John.

On Sun, Jan 7, 2018 at 4:41 AM, Alexander Ilin <ajs...@yandex.ru> wrote:

> > 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.
>
>   Also, is it OK that I'm seeing hundreds of TCP connections being made
> between the processes?
>   It seems like every individual message is sent in a separate connection,
> which brought up and then torn down instantly.
>
>   I would expect a longer-lived TCP channel to be established, but what do
> I know about how networks (and Factor) work...
>
> ---=====---
>  Александр
>
> ------------------------------------------------------------
> ------------------
> 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
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
------------------------------------------------------------------------------
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
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to