From: Hans-Werner Hilse <hwhilse@gmail.com>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [RFC v2] alfred: implement TCP support for server-to-server communication
Date: Sun, 27 Mar 2016 20:37:37 +0200 [thread overview]
Message-ID: <69c47d370308ade423bdc4c2d54d434e@hilses.de> (raw)
In-Reply-To: <1459103215-22444-1-git-send-email-hwhilse@gmail.com>
Hi,
Am 2016-03-27 20:26, schrieb Hans-Werner Hilse:
> [...]
> Changes in v2:
> - non-blocking sending over TCP sockets
This uses non-blocking IO also for sending via TCP.
TCP is chosen when the message size exceeds MAX_UDP_ANSWER (from
alfred.h), which is for now conservatively chosen to fit in bad-case MTU
settings - or if the data request came via TCP (as the same connection
is then used for the reply).
I've run this for a few hours in a test setup with 3x alfred as master
and 30 slaves, with some errors, dups and latency thrown in for good
measure (yay for VDE, virtual distributed ethernet).
The current implementation has a downside: non-blocking TCP sending for
now assembles the full data that is to be sent in a memory buffer, which
will then get sent bit by bit (depending on buffers, network and the
remote side). This is a consequence of the lack of a good way to
guarantee a consistent state of the data store over the time it takes
until the full message stream is completely transmitted to the remote
end (the data store might get modified between beginning and finishing
transmission).
An alternative approach - and a major redesign of data storage - would
be some kind of log-based approach. I'm not so sure if that really is
warranted for, and in any case, that's quite a different undertaking.
The flag "-t" is still present and will toggle whether alfred will try
to request using TCP at all. This will allow to use a TCP-enabled alfred
in an environment that is not yet fully TCP enabled (this matters only
for the master servers AFAICS).
-hwh
next prev parent reply other threads:[~2016-03-27 18:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-21 9:03 [B.A.T.M.A.N.] [RFC] alfred: implement TCP support for server-to-server Hans-Werner Hilse
2016-03-21 9:03 ` [B.A.T.M.A.N.] [RFC] alfred: implement TCP support for server-to-server communication Hans-Werner Hilse
2016-03-21 9:13 ` Sven Eckelmann
2016-03-21 9:38 ` Hans-Werner Hilse
2016-03-21 12:29 ` Simon Wunderlich
2016-03-21 13:25 ` Andrew Lunn
2016-03-27 18:26 ` [B.A.T.M.A.N.] [RFC v2] " Hans-Werner Hilse
2016-03-27 18:37 ` Hans-Werner Hilse [this message]
2016-04-22 18:37 ` jens
2016-04-24 22:02 ` Hans-Werner Hilse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=69c47d370308ade423bdc4c2d54d434e@hilses.de \
--to=hwhilse@gmail.com \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox