Solved

Web server applications

Posted on 2001-06-15
3
146 Views
Last Modified: 2010-04-06

How will I write a web server application in Delphi?.What should be the type of the webserver application?.
0
Comment
Question by:mrk_raj
3 Comments
 
LVL 17

Expert Comment

by:inthe
ID: 6197617
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6197622
Hello

  with Delphi you can build web server app in three methods: CGI, ISAPI, and ASP, I prefer the ISAPI cuz it's the fastest method of them

if you need to develop ur application with cgi or isapi, see my comment and the other comments in this question

http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=20127095

Mohammed
0
 
LVL 7

Accepted Solution

by:
Motaz earned 10 total points
ID: 6197949
CGI Stand-alone: Is an executable file that uses the standard input/ouput (Consoles) to receive and send data.

Win-CGI: Designed specially for Visual Basic because VB cann't talk directly to standard input/output ports, so that instead the Win-CGI receive and send data using temporary ini files which causes intensive use of hard disk.

ISAPI/NSAPI: (Internet Server API/Netscape Server API) Both are DLL's that work with Microsoft servers/Netscape servers respectively. The good news is that Delphi produce one DLL that can be work with both servers, so that we will refered by ISAPI to both kinds of DLLs.

Comparison:
The most important difference between ISAPI and CGI is that the server launchs new instance of the CGI executable for each request, for example if there is a 7 concurrent users, the server will load 7 instances of the same CGI. This is the most biggest disadvantage of the CGI, because it leads to memory consumption and reduce server performance when the request number increased.
ISAPI loads only once in the memory and it serves all the requests, but it creates separate instances of TWebModule for each request.
The ISAPI is very suitable for large web applications that uses database servers such as Oracle, and Interbase. When the first request received to the web server, it loads the ISAPI DLL and open a connection with database server. When the next request received, there is no need to establish new connection, and the old connection will be used.

In addition to these advantages of ISAPI, there is a drawback of using it.
Since the ISAPI DLL shared for all requests, unhandled error of one request could crash the DLL and hangs the server, and no one else can get a response. In most such cases the DLL must be stopped and started again.
In CGI if an error occures in one request, only it's instance of CGI will be stopped and the others will resume normally.

Motaz
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Virtuailstring tree compare node issue 14 127
add combobox item based on numbers 9 154
QRReport  TQrmemo vertical stretching 1 53
How to build JSON File in Delphi 6 3 46
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 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