[Metacard] Open Stack With CGI on UNIX Server?

Sivakatirswami katir at hindu.org
Sat Nov 24 16:44:00 EST 2001


I am considering the option of storing HTML template data and code chunks in
a MC stack on a server and running MC .cgi scripts to tell Apache to get
that data, build pages and serve the HTML... Since I don't know PHP, PERL,
ASP and really have no intention/time to learn them... xTalk is pretty much
my only option (and also, the "easier way to do that")  We asked this
before, but didn't get much feedback... maybe no one is doing it?

Options are: 
 
a) store the code in fields of the stack and call the fields
      (easier to manage)
b) store the code in customProperties of a stack and get the properties

c) store code in small text files... (gets back to reading everything from
disk each time)

Using a script like this:

on startup
   open stack "../htmlDataBase/templateData.mc
 ## extract the data, build the page(s), email(s)
 ## serve the page (s); send the email(s)
end startUp

Questions arise:

1) Does the "open stack" syntax "mean" anything in the no console mode of
MC? i.e. is the stack actually opened and loaded into the RAM of the host
server by the mc.cgi/apache, thereby making the custom properties
"instantly" available as opposed to reading text files from disk? i.e. there
would be a single file read, and the rest done in memory?

or if the "open Stack" syntax doesn't really load the stack into the HOST
ram...then I guess it means each call for field or custom property data is
in fact a disk read...

Which is it?

2) Is there an I/O issue for multiple, near simultaneous hits to the CGI,
where the data for two simultaneous hits on the same CGI asking for data
from a single stack could be a problem?

I am no so much worried about time to serve the pages [as far as I can see
.asp and java scripts that serve HTML pages from databases are already
painfully slow and MC I expect will easily outperform them...]

The underlying, unresolved, bigger question/worry is, obviously... how to
optimize so that multiple simultaneous hits during peak access period don't
cause Apache to error out? And, would it be better to have all the code be
simple, separate text files--painful to manage, but perhaps easier for the
I/O routines of the server? anyone have experience in this area?

Hinduism Today

Sivakatirswami
Editor's Assistant/Production Manager
katir at hindu.org 
www.HinduismToday.com, www.HimalayanAcademy.com,
www.Gurudeva.org, www.hindu.org

Read The Master Course Lesson of the Day at
http://www.gurudeva.org/lesson.shtml





More information about the metacard mailing list