New to web programming, some questions about DB connections lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- gerardus · 2016-12-05 12:23 Hi, I started playing with Lazarus & the Brook framework to make a standalone web ser app. I need this server application to access a Firebird database. http://silvioprog.github.io/brookframework/ Is the auto-generated server application multithreaded?  If so, do I need some kind of locking to use SQLDB components? best regards, Gerard. ---------------------------------------------------------------------- tudi_x · 2016-12-05 12:38 Connection to database is in most case single threaded therefore you might need a connection for each thread or a critical section (slower). As far as I can recall the embedded Brook web server can work multi threaded. ---------------------------------------------------------------------- Leledumbo · 2016-12-06 11:04 Quote from: gerardus on December 05, 2016, 01:23:34 pmIs the auto- generated server application multithreaded? No, but can be activated in a single line: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i (BrookApp.Instance as TBrookHTTPApplication).Threaded := true; Quote from: gerardus on December 05, 2016, 01:23:34 pmIf so, do I need some kind of locking to use SQLDB components? I don't need it when using MariaDB, but perhaps other dbms requires it. ---------------------------------------------------------------------- gerardus · 2016-12-06 11:19 Thanks for your replies. ---------------------------------------------------------------------- hrayon · 2016-12-06 12:00 Are you using the embedded version(Firebird 2.5.0 or greater)? The embedded libraries - libfbembed.so on POSIX and fbembed.dll on Windows - are now multi-thread-capable and thread-safe, so they can be used in multi-threaded applications. ---------------------------------------------------------------------- gerardus · 2016-12-06 12:17 I am using the linux client library against a windows server. If the project finally is done, I won't be able to use the embedded libs. It will be against a server that is already in production in a classic client/server setup. Thanks for pointing this, it seems that all the client libs are thread-safe from 2.5 on? http://firebirdsql.org/file/documentation/release_notes/html/en/2_5/rn fb25-engine-thrdsafe.html