NaviServer - programmable web server
4.99  5.0

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

main-features(n) 5.0.0a manual "NaviServer Manual"

Name

main-features - NaviServer Features

Table Of Contents

Description

What is NaviServer?

NaviServer is a World Wide Web server that provides access control and database connections and runs on multiple UNIX platforms. NaviServer can access SQL databases including Sybase, SOLID, Postgres, and some third-party database drivers.

NaviServer is extendable with both C and Tcl APIs that expose core functions and provide primitives for accessing the database. NaviServer also provides optional CGI support, although the C and Tcl APIs are more powerful, offer superior performance, and are easier to use.

You can configure multiple servers within one NaviServer configuration file, and then specify which server to run when you run NaviServer. NaviServer also uses a multi-threaded design on all supported platforms. You can configure the number of threads each server can use.

NaviServer offers direct connections to SQL databases such as Postgres, Sybase, MS SQLServer. Third-party database drivers are provided for Oracle, Informix, and Interbase. You can even configure NaviServer to have connections to multiple databases and specify which databases are available to each server.

NaviServer also includes server administration capabilities. An access control system allows you to specify separate permissions for each combination of URL and HTTP method (GET, PUT, or POST). You can also specify users and groups who are allowed access to NaviServer.

Features

NaviServer Administration Features

High Performance

Fast and efficient handling of simultaneous connections through a combination of multi-threading, in-memory caching, and single-threaded asynchronous I/O. NaviServer has an advanced multithreaded architecture. Multithreading features include:

  • Fast response without having to fork for each connection.

  • Multiple, simultaneous servicing of connections.

  • Ability to keep state in the address space of the single NaviServer process - no need to maintain slow and messy external files!

  • Simple programming model where each request is handled in its own thread, freeing the programmer from the worry of a long running request blocking the server.

  • Fully configurable minimum and maximum number of threads on a per-virtual server basis. Threads are transparently added when demand rises and then slowly exit as demand falls.

  • The Tcl interface is fully multi-threaded aware - no special steps are required to ensure proper concurrent script evaluation.

  • The nsthread platform-independent C API for multithreaded programming which includes:

    • Functions to create and wait for new threads

    • Mutex, critical section, semaphore, and event objects to protect shared resources

    • Thread local storage for maintaining per-thread data

  • The nsthread interface allows the NaviServer programmer to write new C functions which use advanced multithreaded locking and synchronization techniques independent of the host platform. In fact, the NaviServer is written entirely using the nsthread interface - no platform specific multithreading code is used anywhere in the NaviServer or in any NaviServer module. No other Web server provides this level of multithreaded programming support!

  • NaviServer performs in-memory caching of pages and scripts, and single-threaded asynchronous I/O for returning static content.

Tcl Scripting

Quickly add dynamic content to your website:

  • Integrated multi-threaded interpreter runs scripts in parallel in one process with complete access to server state

  • NaviServer Dynamic Pages (ADP's) allow embedding of Tcl scripts in HTML pages

  • Rich, easy-to-use scripting language loaded with new NaviServer-specific extensions for building web applications

  • Ability to add your own C commands to the language

NaviServer includes the Tcl (Tool Command Language) scripting language as an integral part of its architecture:

  • The Tcl interface allows you to quickly build custom Web applications without C code or messy CGIs.

  • The Tcl interface is multithreaded, allowing more than one Tcl script to operate in one or more virtual servers simultaneously.

  • Built-in Tcl scripts operate up to 10 times faster than comparable Perl-based CGIs.

  • The Tcl interface can be extended to include your own custom Tcl commands written as Tcl procedures or as C primitives.

  • NaviServer extends Tcl to include commands for accessing one more open databases without writing any C code or executing slow external CGIs.

  • The Tcl interface includes useful commands for accessing HTML form data and information about the active connection.

  • The Tcl interface provides a command for opening a TCP/IP socket which can be used to implement a quick HTTP transaction to another Web server or send Email using SMTP (a procedure for sending email is included).

  • Resources allocated during evaluation of a Tcl script (e.g., open database handles, open files, ns_Set data) are automatically garbage collected after the script returns, freeing the script developer of these tedious tasks.

  • Tcl scripts can be in the pages directory along with the HTML pages and images or in a special Tcl library directory:

    • Scripts in the pages directory are evaluated on each transaction which is ideal for quick script development.

    • Scripts in the library directories are evaluated at startup time for fast response without having to open and read the script file.

  • NaviServer includes an HTML-forms based interface for creating and updating Tcl scripts which are located in the Tcl library directory. Also included is a simple HTML form for ad-hoc evaluation of a Tcl script typed directly into a text area box.

  • Tcl, unlike Java, has been in use by a large user community for years (join the comp.lang.tcl newsgroup) and is well documented by the creator of Tcl, John Ousterhout of Sun Microsystems.

  • NaviServer Dynamic Pages (ADP's) are HTML pages that are parsed and run on the server when the page is accessed -- ADPs contain HTML tags and Tcl scripts. ADPs are ideal in situations where you want to generate part or all of a specific page dynamically.

Complete C API

Write custom dynamically loaded modules for:

  • Handling requests

  • Translating URLs

  • Logging

  • Database access

  • Thread creation and synchronization

  • And much more!

The NaviServer includes a complete C API. Using the C API you can write:

  • Custom request functions to handle HTTP request to a URL or a complete hierarchy of URLs.

  • Custom URL-to-file translation routines to convert an HTTP URL to a file in the local filesystem. This can be used to map URLs to one or more filesystem directories as required for maintenance or load balancing.

  • Rich Tcl API for use in your Tcl scripts. NaviServer provides initialization functions to ensure your command is available in all the Tcl interpreters in a virtual server Tcl interpreter pool.

  • Database drivers to interface NaviServer to your own DBMS.

  • Communications drivers so NaviServer can implement HTTP over a new underlying protocol:

    • The included nssock module implements HTTP over regular TCP/IP sockets just like other basic Web servers such as NCSA, CERN, or WebSite.

    • Multi-Protocol support (e.g. smtp, nameserver, udp, ...)

    • Filter functions which run at any stage of each HTTP request. A filter can be used to implement logging - in fact, this is how the nslog Common Log Format logging module works.

    • Scheduled procedures which run in the background at regular intervals. A scheduled procedure can be used in conjunction with a filter function to implement a statistics gathering system, or is often used for house-cleaning functions (similar to cron-jobs or at-jobs).

    • Configuratble job queues for heavy duty background work.

No other Web server C API is as complete and powerful as the NaviServer C API!

SQL Database Services

Powerful and easy access to a variety of SQL databases. Driver source for PostgreSQL and Sybase/MSSQLServer are included with others available from third parties.

NaviServer includes loads of features to help you connect your website to SQL databases:

  • Provides a platform independent interface to SQL relational databases.

  • Connects to underlying database servers through plug-in database drivers:

    • Included are drivers for Sybase, MS SQLserver, and PostgreSQL.

    • The NaviServer/AOLserver Communities have also contributed drivers for Informix, Oracle, Interbase, and MySQL.

  • NaviServer maintains one or more pools with one or more open database connections. By maintaining open connections, HTTP requests have instant access to the database instead of incurring the expensive startup time of a CGI-based solution.

  • Requests are queued in first in, first out order to ensure efficient and fair use of database resources.

  • Database operations are available through both the C and Tcl API's.

Secure Sockets Layer

SSL enables network encryption for e-commerce applications via nsssl module.

Hierarchical Access Control

Restrict access to all or part of your Web through lists of users, groups, and/or client address.