From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,131e3d946b949413 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.43.64.143 with SMTP id xi15mr10719610icb.20.1363061116403; Mon, 11 Mar 2013 21:05:16 -0700 (PDT) Path: q9ni12130pba.1!nntp.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!backlog1.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!weretis.net!feeder1.news.weretis.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: UDP networking with Ada Date: Fri, 8 Mar 2013 16:39:46 +0100 Organization: cbb software GmbH Message-ID: <16ylieomzpchm$.l6pk6na8yrwv.dlg@40tude.net> References: <1lrwhejdn8zy1.rn2edujfic0u$.dlg@40tude.net> <58CdnbOaDPJBS6TM4p2dnAA@giganews.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 2403 X-Received-Bytes: 2626 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2013-03-08T16:39:46+01:00 List-Id: On Fri, 08 Mar 2013 07:17:32 -0500, Peter C. Chapin wrote: > On 03/08/2013 07:12 AM, Dmitry A. Kazakov wrote: > > > Yes. UDP is wrong choice, almost always. For multicast purposes there exist > > stream-oriented protocols which supersede UDP, e.g. PGM. So, except for > > communication to legacy devices and LAN broadcasts UDP should never be > > used. > > UDP is a good choice for simple request/response protocols where both > the request and the response are small enough to fit into a single > datagram. No, because of non-delivery and ordering issues. > For example: DNS. Also in this situation the overhead of TCP > might be considered undesirable. Which is largely an urban legend. 1. Once the non-delivery, acknowledge, ordering etc issues solved, UDP would likely have bigger overhead than TCP. Remember that some parts of those in the case TCP are implemented directly by the hardware. Whereas for UDP it is the application = the CPU, which must do all the job. 2. There is no OS under which you could choke 1000 Base, even 100 Base Ethernet on a P2P connection. 3. We did measurements actually. Latencies of TCP/IP (with NO_DELAY) and UDP are basically same under VxWorks and Windows. UDP could be used for connectionless (=> stateless) stuff which is basically limited to network announcements. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de