CGI vs MySQL help!

  • Alex_
  • Born
  • Born
  • Alex_
  • Posts: 1

Post 3+ Months Ago

Hi, guys! I'm new to this forum and to CGI so I would like to start out with some basic questions that I haven't been able to figure out!

How does the CGI thing work with Apache when multiple clients requests a CGI page at the same time?
Does apache launch multiple instances of the CGI program or does it handle the requests consecutively?

I would like to build a pretty large database that can handle lots of users at the same time.
I was thinking of having a normal .exe run continuously so that single CGI instances, when launched by apache, could connect to the .exe and request data from it.

I was thinking of using MySQL + PHP but MySQL doesn't seem to support particularly advanced datastructures. For example I would like to have a table cell point to another table.

Oh, if you have any better solutions or alternatives to what I have come up with please post them!
Thanx a lot!
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

Multiple requests are handled at the same time by different threads belonging to the same process. You will not run into conflicts unless you exceed the maximum number of concurrent connections (threads). This number is very high, and can be set higher. Don't worry about the technical details - it just works.

MySQL as a restriction on the number of concurrent connections, but it can be changed. You'll have to check the documentation. I assume other databases are similar.

If MySQL does not support the features you require, consider PostgreSQL.

If you have complex queries and plenty of users, you may want to consider page caching. For example, cnn.com may (probably do) run a query every hour to check for new stories and re-write a static html page. That equals 24 queries per day serving millions of users.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 88 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.