Using a Web server application programming interface (API) rather than CGI can improve the performance of Net.Data considerably. Net.Data supports the following server APIs:
For more information about each API, see Using the Web Server APIs and the README file for your version of Net.Data.
Requirement: To run Net.Data in GWAPI, ISAPI, or NSAPI mode, you must reconfigure your Web server to use Net.Data DLLs or shared libraries as its service directives. After reconfiguring, you must restart your Web server so that any changes you make to the Net.Data initialization file take effect. By default, Net.Data runs in CGI mode.
The following sections describe how to configure Net.Data and the Web server to run Web server API mode. General steps and examples are provided, but they might differ for your operating system. Refer to the Net.Data README file for your operating system for specific instructions.
To configure GWAPI:
See the Net.Data README file or program directory for your operating system for specific file and directory names.
For example:
Service /cgi-bin/db2www* /home/http/cgi-bin/dtwicapi.o:dtw_icapi*
See the Net.Data README file for your operating system for specific file and directory names.
GWAPI has full compatibility to support existing applications. Use the same methods as you use for CGI to invoke a URL, form, or link with GWAPI. Any macro that executes successfully using CGI will execute successfully using GWAPI. No modifications need to be made to these macros.
/inetsrv/scripts/dtwisapi.filetype
Where filetype is .dll for Window NT and OS/2 and .o for UNIX operating systems.
See the Net.Data README file for your operating system for specific file and directory names.
http://server1.stl.ibm.com/cgi-bin/db2www/test1.d2w/report
Then you should invoke Net.Data as the ISAPI plug-in with the following URL:
http://server1.stl.ibm.com/scripts/dtwisapi.dll/test1.d2w/report
http://server1.stl.ibm.com/cgi-bin/db2www/orders/test1.d2w/report
Then the equivalent URL to invoke Net.Data in ISAPI mode is:
http://server1.stl.ibm.com/scripts/dtwisapi.dll/orders/test1.d2w/report
/netscape/server/bin/httpd/dtwnsapi.filetype
Where filetype is .dll for Window NT and OS/2 and .o for UNIX operating systems.
See the Net.Data README file for your operating system for specific file and directory names.
obj.conf | Add to the top of the file:
Init fn="load-modules" shlib="<path>dtwnsapi.dll" funcs=dtw_nsapi |
obj.conf | Add to the Services directive:
Service fn="dtw_nsapi" method=(GET|HEAD|POST) type="magnus-internal/d2w" |
mime.types | Add this type, where d2w is the default extension of the
macro. You can specify any three-character combination.
type=magnum-internal/d2w exts=d2w |
/netscape/server/docs/
http://server1.stl.ibm.com/cgi-bin/db2www/test1.d2w/report
While the following URL invokes Net.Data as the NSAPI plug-in:
http://server1.stl.ibm.com/test1.d2w/report
If you keep your Net.Data macros in several directories, the last three steps change:
http://server1.stl.ibm.com/cgi-bin/db2www/orders/test1.d2w/report
The updated URL used to invoke Net.Data in NSAPI mode is shorter, but keeps the directory name:
http://server1.stl.ibm.com/orders/test1.d2w/report