Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Michael Gill
  Where is Michael Gill?
 Flora
 Illinois - United States
 Michael Gill
 To: Eric den Doop
  Where is Eric den Doop?
 Houten
 Netherlands
 Eric den Doop
 Tags
Subject: RE: Creating a website...
Thread ID: 3156 Message ID: 3162 # Views: 15 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Wednesday, August 22, 2001 9:18:33 AM         
   


> > Hi all,
> >
> > I'm endeavoring to create a site that has similar attirbutes to Foxite. I'm wondering something about the tables. Should I create a database or free tables?
> >
> > I don't know how the backend will handle the tables just yet. Will the tables need to be opened and closed for each request? Or will they just be opened once somehow? That's what I don't know resulting in my first question. =)
> >
> > I've reviewed an article at west-wind.com in regards to the FoxISAPI.dll but didn't see this covered. Thanks in advance to everyone that may reply. I'm sure you'll be hearing more from me on this project.
> >
> > Thanks again,
> > Mike
>
> Hi Mike,
>
> All depends on what you want. Foxite uses a .DBC, mainly because it can take care of the primary key generation itself. It also has some default values for example a DATE() for the post_date field. If you look at the third parameter passed (by reference) to the VFP COM object by the foxisapi.dll, then you have the option to set it to 0 or to a value <> 0. If you set it to 0, the object (thus the windows process) will not be released after it has finished the requested action. Otherwise it releases the object (and the windows process ends). In other words: if you choose to release it, the COM server has to open the table every time. I did not want to terminate the .EXE process, because it would take too much time to restart it for each new request. That would also mean that I could not buffer the forum page (iow: it would have to rebuild the forum page all the time and that would slow down the site a lot). VFP is not multi threading, so each request is queued by the foxisapi.dll. This can result in timeouts and that is not what we want. Therefore, the Foxite web engine is is setup to run 5 different instances (eg processes) of the same COM EXE at the same time. This means that the code needs to run in a shared environment, so always take care of EXCLUSIVE stuff. If one EXE is busy, then foxisapi.dll starts a new process to answer the new request. Important note: you can compile a COM exe or dll as a single use or a multi use component. If you set it up to be a multi use, then foxisapi.dll creates a new instance of the com server but in the same process. This means (at least for Foxite) that the time out errors would still occur. With the last update of the web engine, I set the server to be a single instance which forces foxisapi.dll to create a new instance as a new process.
>
> By the way, do not forget to download the latest version of foxisapi (incl. source codes) from the download/update page at the VFP Home Page. VFP7 ships with a different version of foxisapi.dll. Its file size is bigger than the version that you can download from the web site, but the version number of the VFP7 foxisapi.dll is < the downloadable version. Kind of weird and I am sure somebody at MS has made a stupid mistake. I've contacted the support group but I have not received any response yet.
>
> Hope this makes sense.
> --
> Eric den Doop
> www.foxite.com - The Home Of The Visual FoxPro Experts


Yes Eric, it makes a lot of sense. I've got a lot of learning to do. =)

The one thing that I'm still unclear of is this...

>Therefore, the Foxite web engine is is setup to run 5 different instances (eg processes) of the same COM EXE at the same time.

Does that mean that only 5 people can be accessing Foxite at one time? If that is true, why?

Thank you so much,
Mike



COMPLETE THREAD
Creating a website... Posted by Michael Gill @ 8/21/2001 10:34:47 PM
RE: Creating a website... Posted by Eric den Doop @ 8/22/2001 2:41:14 AM
RE: Creating a website... Posted by Michael Gill @ 8/22/2001 9:18:33 AM
RE: Creating a website... Posted by Eric den Doop @ 8/22/2001 9:50:11 AM
RE: Creating a website... Posted by Michael Gill @ 8/22/2001 10:33:33 AM
RE: Creating a website... Posted by Michael Gill @ 8/22/2001 12:08:30 PM
RE: Creating a website... Posted by Eric den Doop @ 8/22/2001 1:24:40 PM