Solved

CGI use in web host

Posted on 2000-03-12
9
171 Views
Last Modified: 2010-04-04
Hi!

I'm developing a CGI application and I'm writing it as an EXE. I know I can make it as an DLL and that's my problem :

I wish to make a banner rotator and my web provider only allow me to use about 10% of system resources, so what's the best to use? DLL or EXE? Note that it will have some traffic.

All I need to know, is wich is best, why, and if it's a library, what do I have to change in the application to make it a DLL.

Thanks.
0
Comment
Question by:jpcs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 15

Expert Comment

by:simonet
ID: 2609873
If you want to create an ad rotator, why not use ASP? IIS already features an adrotator object that can save you a lotta time.

As of the EXE x DLL question, there are lots of difference between them:

An EXE is a CGI, and as an EXE, it is loaded/unloaded everytime a call to it is necessary.

A DLL is a ISAPI module, and it is loaded only once, residing in memory until the server is shutdown or until it's explicitly unloaded from the server.

In both cases, you'll need IIS or PWS to load use them. I strongly suggest IIS 4 or 5 (W2k).

Alex
0
 
LVL 1

Author Comment

by:jpcs
ID: 2609892
Hi!

Thanks...

About the ASP, the problem is that the rotator is a little more complex than a simple rotator.

I suppose the server uses APACHE for win32 and I can't use which I want,m since it's virtual hosting.

How Can I unload the ISAPI from my computer?

regards
0
 
LVL 15

Expert Comment

by:simonet
ID: 2609919
Since you're using Apache, then you have to use CGI, since Apache doesn't support ISAPI. AFAIK, only IIS supports ISAPI.

Anyhow, using CGI with Apache is pretty much the same thing as with IIS.

Unloading the ISAPI DLL from IIS can be done from the MMC options. I am not on an NT machine right now, but if I recall correctly, you select the site (on MMC for IIS), select the DLL, right click it and then select Properties. There's one option for the loading the DLL that allows you to unload it using MMC (in the same screen).

To change an ISAPI project to a CGI project is a simple process and is explained here:

http://community.borland.com/article/0,1410,20641,00.html

Yours,

Alex
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:jpcs
ID: 2610088
hi!

sorry to bother again, but as I said, It's virtual hosting, so I don't have access to the machine from my computer (I suppose), all I can do is use FTP client.

any ideas?
0
 
LVL 15

Expert Comment

by:simonet
ID: 2610132
Then you're better off using CGI. This way you don't have to worry about loading/unloading the file.

You'll be able to replace it unless there's a user at your site, using the CGI at the *exact* moment you're replace it.

You should also make sure the webmaster gives you the Script and Execute privileges for the site. if you don't have the EXECUTE privilege, the http server will not be allowed to run the CGI program and an 500 (internal server error) will be returned instead.

Yours,

Alex
0
 
LVL 1

Author Comment

by:jpcs
ID: 2610269
Thats what I suspected... but what about the CPU usage, won't I overload it using the exe?
0
 
LVL 15

Accepted Solution

by:
simonet earned 100 total points
ID: 2610282
Not really. Using an EXE causes some overhead, but very small to be relevant.

Alex
0
 
LVL 1

Author Comment

by:jpcs
ID: 2610290
great thanks... I'll give you the points.
0
 
LVL 15

Expert Comment

by:simonet
ID: 2610300
Thanks! Good luck with your project.

Alex
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question