Subject: Re: [SWIPL] How serialize Prolog database updates from multiple clients on Windows?

From: Jan Wielemaker <[email-masked]>
Date: Mon, 3 Dec 2001 22:38:43 +0100

> I can execute SWI-Prolog as a CGI program on Apache web server running
> on Windows. But I also want to serialize Prolog database update requests
> from independent users so as to maintain the database's integrity. Does
> anyone know a straightforward way to do this?

The picture is a bit unclear.  What database are we talking about?
Each Prolog started as CGI program has its own database, but there is
no persistency.  You can of course make Prolog connect to a database
engine.  In that case the DBs transaction management should fix your
problem.  You can also use a Prolog file as `database', appending to
it.  In that case you need some file-locking to avoid making a mess of
your file on concurrect access.  This is provided in the current
version for POSIX systems, but not for the Windows version.

There are numerous other scenarios, so please be concrete in what you
want to solve using what start and constraints.

	--- Jan