comp.lang.ada
 help / color / mirror / Atom feed
From: Emmanuel Briot <briot.emmanuel@gmail.com>
Subject: Re: Single-Instance Executable, TSR-style programs, "lockfiles" and the DSA
Date: Sat, 11 Sep 2021 00:42:19 -0700 (PDT)	[thread overview]
Message-ID: <1a3b3c31-03de-4ffc-bc5b-bbbb6e6c3734n@googlegroups.com> (raw)
In-Reply-To: <3a1b8e39-daf8-4ae4-9e2e-6e4b76fa7a5dn@googlegroups.com>

> When you moved to DB, did you use the DSA to have a Database-interface partition and client-query/-interface partition? I'm assuming not, because such a ticketing system probably doesn't have enough need for distributed clients, 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 layer 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 have 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 remote-interface that node.

I don't think you need a task dedicated to the database. Postgres handles concurrency very efficiently, it can do asynchronous queries if you really need 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)

      reply	other threads:[~2021-09-11  7:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 21:23 Single-Instance Executable, TSR-style programs, "lockfiles" and the DSA Shark8
2021-09-10  7:10 ` Emmanuel Briot
2021-09-10 16:26   ` Shark8
2021-09-11  7:42     ` Emmanuel Briot [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox