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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,a52626a9019b830,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.224.223.84 with SMTP id ij20mr3408546qab.5.1347055552522; Fri, 07 Sep 2012 15:05:52 -0700 (PDT) Received: by 10.236.74.38 with SMTP id w26mr1138762yhd.18.1347055552491; Fri, 07 Sep 2012 15:05:52 -0700 (PDT) Path: da15ni1572qab.0!nntp.google.com!b19no9373qas.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 7 Sep 2012 15:05:52 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=70.51.153.177; posting-account=cUi90woAAADTaOISowbbHM8GUD0-opJO NNTP-Posting-Host: 70.51.153.177 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <3b3a796d-50e0-4304-9f8d-295fb2ed0e82@googlegroups.com> Subject: Help writing first daemon From: Patrick Injection-Date: Fri, 07 Sep 2012 22:05:52 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-09-07T15:05:52-07:00 List-Id: Hi Everyone I am setting out to write my first daemon. There seems to be a lot of optio= ns for inter-process communication on posix systems. I am planning on desig= ning a scientific instrument control server that will control ports, like t= he serial port, based on signals it is sent. It will also collect data from= instruments and store the data(I was thinking in a postgresql database). I just need signals passed on one machine so yaml4 seems like overkill. I w= as thinking that I could write many little commands, with each command spec= ific to an instrument it is designed to control and the daemon as more gene= ral infrastructure(basically middleware), so it wouldn't really be a parent= /child relationship. I'm guessing plain old pipes are out. Does FIFO/names pipes sound reasonable for this sort of thing? I am concern= ed that with many commands acting on the daemon there will be too much over= head with these commands creating file handlers. I am also going to control instruments over Ethernet anyways so would inves= ting time in socket programming solve two problems by making it a socket ba= sed server? Once the socket is set up by the daemon, the smaller "satellite= " commands would not need as much overhead to connect to a port as they wou= ld to create a file handler, would they? Lastly, this will be done in Ada where ever possible, is there an Ada orien= ted way to do this sort of thing? Thanks for reading-Patrick