From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 9 Jan 2019 16:53:44 +0300 From: Konstantin Osipov Subject: Re: [tarantool-patches] [PATCH v3 5/6] [RAW] swim: send one UDP packet per EV_WRITE event Message-ID: <20190109135344.GF20509@chai> References: <606bb0e206b7f6a4a45a92e9d200e35d58e815f1.1546077015.git.v.shpilevoy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <606bb0e206b7f6a4a45a92e9d200e35d58e815f1.1546077015.git.v.shpilevoy@tarantool.org> To: tarantool-patches@freelists.org Cc: vdavydov.dev@gmail.com List-ID: * Vladislav Shpilevoy [18/12/29 15:07]: > Since the first commit of #3234, where anti-entropy component was > introduced, a single SWIM message could be split into multiple > UDP packets. But so far these packets were being sent in mere > 'for' loop on a single EV_WRITE event. It is not proper way of > using event loop, but the simplest, because does not require any > externally stored positions in packet lists. > > The previous commit introduced such global list of UDP packets to > send, and now it is much simpler to send each packet on separate > EV_WRITE event. This commit does it. > Looks like this commit breaks encapsulation of the transport layer. One thing, is that we should not have tasks which require sending multiple packets. Another is that the packet concept is part of the transport and should not leak into the protocol itself. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov