Creating a server and client program like online reservation program using socket API in C
I need some help in figuring out the design principle for this program. I donot expect progamming code but rather some design and architecture theory.
I am programming in C language using Socket API. I want to know how SQL database, Socket API, other language, etc are needed to complete it. If possible without lot of hassle, I want to upload on webserver. I appreciate for you help.
Make small library that has wrapper functions for socket API, another library for SQL database access, and anything else you might use. These libraries should do error handling, among any other thing you might do. Emit some diagnostics and decide whether to continue or abort the program, and do it. Build and test these libraries.
Then write your program, that is, reading and writing to the database and network and anything else you might add. Link against your libraries when building.
This program, from what I understand from the question, is going to listen on a port for incoming connections, fork a thread (or process), and keep listening. The child process will decide what to read or write and whether to network or database.
I hope this is simple for enough for the homework to get you started.