[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About the gambas web apps


Hi Lee,

Am 26.03.25 um 14:40 schrieb T Lee Davidson:

On 3/26/25 7:41 AM, Christof Thalhofer wrote:
If you have concurrent (write-) requests to the database you have
to implement a locking mechanism.

Are you talking about concurrent (write-) requests within the same
user session/connection? Or, concurrent (write-) requests to a SQLite
database? Or both? Because, AFAIK, the more known database engines
like MySql/MariaDB and PostGreSQL have their own locking mechanisms
to handle concurrent (write-) requests from different connections
(whereas SQLite does not), but not for concurrent requests from the
same connection.

A single session should not be able to do concurrent writes to the database unless the programmer uses multitasking within the Gambas program. So naturally reads and writes to the database occur in a serial manner.

I am talking about simultaneous writes to the database which can occur when different users request services from the Apache which itself starts a new instance of the webapp for each request.

No single instance can know what the other(s) are currently doing.

For such a constellation I would not use SQLite which locks the whole database for each write attempt. Instead I would prefer Postgresql.

Alles Gute

Christof Thalhofer

--
Dies ist keine Signatur


References:
About the gambas web appsgaucho <64xcode@xxxxxxxxx>
Re: About the gambas web appsChristof Thalhofer <chrisml@xxxxxxxxxxx>
Re: About the gambas web appsT Lee Davidson <t.lee.davidson@xxxxxxxxx>