From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_05,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:ad4:468c:: with SMTP id bq12mr1284504qvb.21.1631346139885; Sat, 11 Sep 2021 00:42:19 -0700 (PDT) X-Received: by 2002:a25:d497:: with SMTP id m145mr2281727ybf.389.1631346139589; Sat, 11 Sep 2021 00:42:19 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 11 Sep 2021 00:42:19 -0700 (PDT) In-Reply-To: <3a1b8e39-daf8-4ae4-9e2e-6e4b76fa7a5dn@googlegroups.com> Injection-Info: google-groups.googlegroups.com; posting-host=87.88.29.208; posting-account=6yLzewoAAABoisbSsCJH1SPMc9UrfXBH NNTP-Posting-Host: 87.88.29.208 References: <71d68159-3f72-4949-bc4f-ef83f8cd7067n@googlegroups.com> <3a1b8e39-daf8-4ae4-9e2e-6e4b76fa7a5dn@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1a3b3c31-03de-4ffc-bc5b-bbbb6e6c3734n@googlegroups.com> Subject: Re: Single-Instance Executable, TSR-style programs, "lockfiles" and the DSA From: Emmanuel Briot Injection-Date: Sat, 11 Sep 2021 07:42:19 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:62698 List-Id: > When you moved to DB, did you use the DSA to have a Database-interface pa= rtition and client-query/-interface partition? I'm assuming not, because su= ch a ticketing system probably doesn't have enough need for distributed cli= ents, report-generators, etc. to justify such a design. We did not use the DSA. Postgres itself is a very capable server, which is = implemented way more efficiently (and tested way better) than we could ever= do I think, since this was only a side job. No reason to add an extra laye= r between the mail-processing program and the database. > I suspect such designs are consequences of the poor support for processes= /tasking that C has; the Ada equivalent of the functionality would be to ha= ve a TASK dedicated to the DB-interfacing [assuming single-node]; for full = multi-node DB-backed/-transacted message-exchange DSA makes a lot of sense:= Partition your DB-interface into a single node, then have your clients rem= ote-interface that node. I don't think you need a task dedicated to the database. Postgres handles c= oncurrency very efficiently, it can do asynchronous queries if you really n= eed that, and so on. If you indeed have a database in your application, you could also use that = to handle inter-process locking (pg_advisory_lock() for instance)