SYSTEM DESIGN OF MULTITHREADED WEB SERVER WITH BACKEND DATABASE CONNECTIONS
Keywords:multithreaded web application, server-client, concurrency, concurrent connections, database connections pool
Web server application creates multiple duplicated subprocesses. Each subprocess software threads listen to a dedicated web socket. Server portal subprocess uses shared list to inform clients which web socket to establish connection with. Moreover, it uses shared queue to aggregate the clients’ database queries. When queue has DB queries, multiple DB connection threads will be invoked to read or write data concurrently to the database. When shared queue is empty, shared queue will put the DB connections threads into wait state to idle instead of disconnecting the connections.
Bonner, P. (1995): Network Programming with Windows Sockets (Bk/Disk). – Prentice Hall Ptr 512p.
Deitel, H.M., Deitel, P.J., Nieto, T.R. (2002): Visual Basic. NET: how to program. – Prentice Hall 1517p.
Hall, B. (2019): Beej’s guide to network programming: Using internet sockets. – Independent Published 174p.
Kozierok, C.M. (2005): TCP/IP Guide: A Comprehensive, Illustrated Internet Protocols Reference. – No Starch Press 1616p.
Makofske, D., Donahoo, M.J., Clavert, K.L. (2004):TCP/IP Sockets in C#: Practical Guide for Programmers (The Practical Guides). – Morgan Kaufmann 192p.