
Some of the main topics in this chapter are
This chapter introduces you to two relatively new members of the Microsoft BackOffice family. Index Server works hand-in-hand with Internet Information Server (IIS) by building indexes of the content published by IIS. Queries, both simple and advanced, can then be created by simply filling out a form with your Web browser. IIS processes the contents of the form, searches for matching content. The results are sorted, formatted, and returned to the user.
The Content Replication System (CRS) provides an important capability: copying Web content from one server to another. There are many reasons why this is necessary in a typical corporate intranet or professional Web site. These reasons are outlined, and the features that CRS provides are explored. In addition, this chapter provides the key planning concepts and network architecture of CRS. The procedures for testing, monitoring, and maintaining CRS are also provided.
Index Server provides content indexing for both IIS and Peer Web Services (PWS), the Web server component provided by Windows NT Workstation. After it has been installed and configured, it will automatically maintain up-to-date indexes of the content that is stored on a Web server. Index Server is largely self maintaining. There are no complicated maintenance procedures, and the product is designed to run unattended 24 hours a day, seven days a week. As new content is added to the Web server, it automatically updates its indexes in an incremental fashion by incorporating any new entries required without having to reindex all content on the Web server.
Index Server will not index only Hypertext Markup Language (HTML) Web pages but also documents created with Microsoft Office products. It is capable of "seeing" the contents of the following types of documents:
In addition, it will index binary files based on their ActiveX properties, but, of course, it cannot scan the contents of such files. Other document types can be indexed by creating custom document filters, but the standard filters included with the product do not support them.
The resulting index that is created is based not only on keywords in the text but also on the Microsoft Office properties (summary and custom) or ActiveX properties of the file or document. All Microsoft Office document formats include a number of standard properties, such as Title, Subject, Author, Category, and Keywords. In general, the properties of a Microsoft Office document can be viewed by selecting File, Properties. In addition to the standard properties for a document, users can add custom properties.
Several sample query forms are provided that can be used to search for content that contains a particular keyword or phrase. This sample query shows only the most rudimentary form of searching that is available. Custom query forms can be created that make it easy for users to formulate complex queries. These queries can perform searches by using document properties, including custom properties tailored to specific applications, if desired.
Index Server is designed to run virtually maintenance free. Unless you need to create filters for custom document types, you might never need to worry about the underlying processes that make this product work. At some time, however, something might go wrong that requires troubleshooting, and an understanding of the way indexes are created and queries are resolved can be useful. In addition, you might simply be curious about how content and property-based indexing is accomplished. An overview is presented here with additional details provided in the following sections. Some details are suppressed for clarity. See the product documentation for full details on all processes.
The process begins when a document is added to an indexed directory on a server. A scanning process recognizes that a new file has been added and invokes another process called CiDaemon. The document is analyzed and then filtered by using an appropriate filter dynamic-link library (DLL) and a word-breaker DLL. (Index Server handles multiple languages and uses different language-dependent rules to determine what to index.) The filtering process identifies keywords and properties extracted out of the document and added to the random-access memory (RAM) resident word lists. These word lists are subsequently incorporated into shadow indexes, which are eventually incorporated into the master index.
At some time, a user will open a query form and submit a query to the Index Server engine. The query is processed by using information from the query form and a special type of file called an Internet data query file (which carries an .idq extension). The query is processed, and the returned results are formatted as a Hypertext Markup Language (HTML) page with the aid of another type of file called an HTML extension file (.htx file). The results are presented to the user's Web browser for display.
By creating custom query forms or custom .idq and .htx files, the query process and the format of the results can be tailored to suit particular needs. The default forms and files are suitable for general purpose indexing and reporting.
Anyone who has spent time "surfing" the World Wide Web has probably had an opportunity to use one of the search engines. These professionally run sites provide sophisticated searching capabilities based on the same type of indexing possible with Index Server. Search engines, such as Yahoo!, Lycos, WebCrawler, and AltaVista, provide content indexes at thousands of Web sites on the Internet. Often, after a Web site is found with one of these large search engines, you still need to find a particular page or document of interest.
Web sites that have a local search engine capability make it much easier to find exactly the subject matter you are after. You can use Index Server to provide such a search capability for both public Web sites and intranet sites that you manage. As the amount of subject matter that you include in your site grows, this capability will quickly become a necessity rather than a nice extra feature.
If you have used a public search engine or have other database experience, you already have a good idea what queries are all about. Information is entered into a form specifying what you are interested in finding. This form is then submitted to the Index Server engine for processing. The queries must be expressed in a query language that has many powerful features. Index Server's query language supports the following capabilities:
This list provides the basics of forming queries that Index Server can resolve. It is possible to create custom forms that simplify the process of formulating queries for a particular subject matter area. This is especially desirable if the user community at your organization is unfamiliar with query processing. However, many sites will not need to customize the query process at all.
The mechanics of actually resolving the query involve the use of some special files. The original query is combined with information in an Internet data query (.idq) file. This file specifies how the query is to be processed. There are two possible sections in an .idq file: the names section and the query section. The names section is optional and is used only to define nonstandard column names that can be referred to in the query. This section is not needed for standard query processing. The query section is used to specify parameters used when the query is parameters in the .idq file are specified in a variable=value format. A variety of parameters is available to control the behavior of query processing. For example, the location of your catalog that contains all indexes created by Index Server is specified in a variable called CiCatalog. Another variable, CiMaxRecordsInResultSet, controls how much information can be returned as results. The variable CiColumns controls the columns returned in the results page and should match the columns referenced in the .htx file used to format the results.
HTML extension files (with a .htx extension) are used to format the results. These files are created by using HTML with conditional statements based on the variables defined and created in the .idq file used for the query being handled. Depending on your interest in customizing the query process, it can be enlightening to review the sample files provided to see how they are designed. The most basic query is handled with the following files, assuming that you have accepted all defaults during installation:
Now that you have been introduced to the query process, the action that occurs behind the scenes to index the content on your Web servers is described. The next few sections track the various actions that occur when new content is added to an indexed directory on your Web server, culminating in a set of entries in the master index.
Indexing starts with a scanning process. By default, all virtual roots defined on your IIS server will be indexed. You can add virtual roots and include them in the indexing process as needed. You can also exclude virtual roots from indexing if you want. These virtual roots can be directories on the Web server machine itself or shared directories on other servers.
Windows NT supports automatic change notification and initiates the scanning process when new files are added to the server. Other file servers (for example, Windows 95 and Novell NetWare) do not support this feature and must wait for a periodic, scheduled scan to occur. A Registry entry (ForcedNetPathScanInterval), which can be configured by the administrator, controls the frequency of these scans.
Two types of scans are performed by Index Server: incremental scan and full scan. The first time a directory is scanned, a full scan of all contents is performed. Thereafter, only an incremental scan is necessary to accommodate the changes that have occurred. Occasionally, an additional full scan could be necessary. For example, after a server suffers a catastrophic failure, a full scan is needed. No administrator intervention is normally needed, even for this type of recovery operation. Index Server has been designed to recover from failures automatically unless an unusual circumstance should occur and go undetected (for example, Registry corruption). The administrator can force a full scan or an incremental scan at any time.
After a directory has been scanned, a three-step filtering process takes place:
Filtering occurs under the direction of the CiDaemon process, which is spawned by the Index Server engine (see the following Note). It must analyze the list of documents that have been scanned and sent for indexing to determine which is the appropriate filter DLL and which is the appropriate word-breaker DLL. As previously mentioned, different filter DLLs and word-breaker DLLs are required to handle documents of different types and in different languages.
NOTE: Daemon is another name for a background process that runs without requiring user intervention. The term is most commonly used in UNIX environments. In a Windows NT environment, the term service has roughly the same meaning and is used much more frequently.
In addition to generating words to be merged, the filtering process also generates a characterization. This is a short summary of the item being indexed that can aid the user in deciding whether this is a document or file that is of interest. The Registry key GenerateCharacterization is set to 1 (by default). If this entry is set to 0, characterizations will not be generated.
Index Server is designed to be operational 24 hours a day, seven days a week. Therefore, it does most of its work in the background and attempts to work only when the server is idle. It also closes any documents that it is processing as quickly as possible if they are requested by another user or application. Filtering of that document will automatically be retried later.
CAUTION: If directories on shared network drives (on another server) are being indexed, the files opened by Index Server will not be quickly released when another user or process requests them. This feature (quickly releasing files needed elsewhere) is not available when indexing shared network drives. Therefore, the filtering process might temporarily hold a file lock on a document while it is being filtered. Use discretion when deciding which directories should be indexed.
To avoid interfering with other more urgent processes on a server, the CiDaemon process runs in the idle priority class by default. In other words, it filters documents only when there is no other work of a higher priority to perform. If you intend to use Index Server on a fairly busy computer, this could result in lengthy delays before documents are filtered and a subsequent backlog will occur. To increase the priority of the CiDaemon process--understanding that this might impact the throughput of other work on this server--you can set the ThreadPriorityFilter Registry key to THREAD_PRIORITY_NORMAL and the ThreadClassFilter to NORMAL_PRIORITY_CLASS.
CAUTION: Changing any of the Registry entries as described in this chapter, especially the priority level, should be approached with extreme care. Improperly editing the Registry can result in corruption of information and the need to reinstall the operating system and restore the most recent backup. This operation should be attempted only by experienced administrators and only after a current backup is made and the RDISK utility is run to create an updated repair disk.
When the filtering process is complete, the resulting word lists are merged, as described in the next section.
Indexes are used in many different computer applications. There are many different types of indexes for different purposes. The indexes that Index Server creates are designed for the purpose of rapidly resolving the search queries used when trying to locate documents or other content on Web servers. The words and properties that have been extracted during the filtering process by CiDaemon are merged into a permanent index stored on disk.
Because Index Server must operate in an environment in which many other activities are being performed (potentially) on the same machine concurrently with its operations--including the need to resolve queries based on the current content and indexes that already exist--a multistep process is used that culminates in a single, up-to-date index. Depending on the load placed on the server and the amount of new information being added, there are intermediate stages that result in a more complex state than a single index.
As already described, the filtering process results in word lists. These can be thought of as mini-indexes for a small collection of documents. They are stored in RAM as they await further processing. If a power loss occurs, these word lists are lost, but Index Server is designed to recover automatically from such an event. Because they exist in RAM, the creation of a word list is very fast.
Word lists are merged to form shadow indexes. These are stored on disk and will, therefore, survive a power loss. More than one shadow index can exist in the catalog, which is the directory containing all indexes for an Index Server. The process of merging word lists (and occasionally other shadow indexes) to form a shadow index is called a shadow merge. During the shadow merge process, additional compression is performed on the information stored in word lists to further optimize storage and retrieval.
A master merge is eventually performed to create the master index. During this process, all shadow indexes and the current master index are merged to create a new master index. At any given moment, there is only one master index. If the server has had an opportunity to "get caught up," then there will not be any shadow indexes or word lists--just the master index. In other words, if there is sufficient processing power and no new documents are added for a period of time, the natural progression of things will result in a single master index and no other index structures. As new documents are added, the process starts again. Index Server is capable of operating properly in any intermediate state but is most efficient when working with just the (complete) master index.
The total number of indexes on a very busy server can grow as high as 255. If the server is so busy that even more shadow indexes would be required, the server will fail, and some reconfiguration will be required to provide faster disk subsystems, additional CPU power, or other additional resources so that it can accommodate the load required. A master merge on a very active machine can be a complex and lengthy process. The automatic recovery capability of Index Server includes even this complex operation. System failure in the midst of a master merge operation is fully and automatically recoverable.
Now that you know how Index Server operates, it is time to learn how to install and use this powerful tool. The following procedure assumes that you have already installed Windows NT Server and IIS. In addition, you should be logged on with administrative rights to the machine, which is set up as an Index Server. If you want to index the contents of other file servers or Web servers, you should define additional virtual directories on the IIS WWW service by using the Internet Service Manager. You can add virtual directories at a later time if you prefer. For more information about defining virtual directories, see Chapter 52, "Setting Up Internet Information Server."
To install Index Server:
This dialog box is used to specify the location of IIS scripts.
After you've installed Index Server, you naturally will be eager to test its functionality. If you already have an operational Web server with an interesting collection of content, all you need to do is wait. Index Server's operations are automatic, and the scanning, filtering, merging, and index creation process occurs without further intervention. Depending on the amount of content and the load placed on the server, you should allow anywhere from 10 minutes to several hours for the indexing process to produce useful results.
You can start by reviewing the online Index Server Guide. This is accessible by choosing Start, Program, Microsoft Index Server, Index Server Online Documentation (see Figure 58.2). Alternatively, you can connect to this Web page by manually entering the URL (http://<servername>/srchadm/help/default.htm by default).
Index Server includes online documentation in HTML format.
When an appropriate period of time has elapsed, you're ready to try a search. Choose Start, Program, Microsoft Index Server, Index Server Sample Query Form (see Figure 58.3). This Web page is the sample query form discussed in the introduction to this chapter. It enables you to test the search capabilities of Index Server.
The sample query form provided with Index Server is a working search page that can be used without modification or customized to meet specific needs.
To test your Index Server, follow these steps:
The results of a query are formatted in HTML and returned to your browser for display.
Fig. 58.5 If properly configured, Microsoft Internet Explorer (version 3.01 for Windows NT shown here) can host documents within its window, such as this Microsoft Word document.
You're now familiar with the main procedures for using Index Server. By design, it's easy to use and manage. With the growth of most Web sites, indexing is becoming a critical feature that is needed to help people find the information they need. Index Server fills this important role with a minimum of work on your part. The next section discusses another member of the BackOffice family called the Content Replication System.
Source control systems, used in the past to coordinate the orderly interaction of a group of programmers working together on a body of computer code, have been pressed into duty to manage Web content. These systems not only enable users to "check out" and "check in" files but also track revisions and even restore an older version if the latest becomes corrupted. Microsoft's SourceSafe is an example of this genre, and a white paper is available on the Microsoft Web site (http://www.microsoft.com/ssafe) describing the use of this product for Web content management.
A new entry in the Web management repertoire is the Microsoft Content Replication System (CRS). This product is designed to move Web content from one computer to another. There are a variety of scenarios in which the product can be used, and a number of methods are supported. This section describes how to set up CRS and walks you through a sample replication.
Although the product could be used to replicate arbitrary information, it's specifically engineered to be used in a Web server environment. For example, one option enables you to specify the content to be replicated by providing an URL.
In this section, you learn how to install CRS on a server. If you intend to use the command-line interface exclusively, then any Windows NT server with sufficiently powerful components (processor, disk drive subsystem, and network interface) will suffice. CRS can be run on either Windows NT Server or Windows NT Workstation. Clearly, if the CRS system is also intended to act as a Web server (as opposed to just a staging server for information that is being moved), it must be running IIS.
Most people will want to take advantage of the CRS Web Administration tool, even if they occasionally use the command-line interface for auxiliary tasks or to confirm the status of a project. This tool is somewhat different from other BackOffice administration tools. It is Web browser-based, which a growing number of BackOffice products are adding, but this is still fairly new. Also, it uses a different style of buttons and controls than you might be used to if you manage other BackOffice products. You might also find it necessary to use the Refresh button to update the display more often with this tool than most others in the BackOffice administration suite, primarily because of its Web-based design. It is, however, relatively easy to learn and use.
NOTE: To use the Web Administration tool, you must install CRS on a Windows NT 4.0 system that has been configured to use the NTFS file system. To ensure security, the CRS Web Administration tool is not supported on disk drives configured with FAT partitions.
As with all BackOffice products, administrative tasks can be initiated from client computers connected to the server over the network. To run the CRS Web Administration tool on a client computer, you must be running either Microsoft Internet Explorer 3.01 (or later) or Netscape Navigator 3.0 (or later).
To administer CRS, you must be able to access the Web Administration tool through IIS. This is subject to IIS security restrictions as described in Chapter 52, "Setting Up Internet Information Server." In addition, you must be an administrator for the Windows NT system that runs CRS. You should also create a service account to run CRS services by using the User Manager for Domains utility.
To install CRS, follow these steps:
The InstallShield Self-extracting EXE dialog box begins the installation of CRS.
This is the Welcome dialog box for CRS.
This dialog box lists the Web-related services that must be stopped before the installation process can continue.
Use the Web Administration and Document Directory dialog box to select the location for the Web Administration tool and the product documentation.
Use the Select Components dialog box to customize your CRS installation.
Use the CRS Service Account dialog box to select the service account that will be used by CRS.
The CRS Start Page provides an introduction to CRS and links you to the Web Administration tool.
You're now ready to use CRS to move Web content on your network. This is described in the next section.
Two interfaces can be used to control CRS. The first is a Web browser-based interface that uses JScript applications to create and monitor the status of projects. The second is a comprehensive command-line interface. Both of these interfaces are described in this section.
Remember that all replication events are managed as projects --no matter how complicated an architecture you want to create. These projects operate on pairs of servers, either pulling or pushing information from one server to the other. Even large replication architectures spanning global networks are based on this simple concept. In the next two sections, you'll learn how to create both push and pull projects, the basic ingredients for all replication scenarios.
It's a good idea to experiment with CRS in a lab environment before deploying
it on your production servers. This is generally true of all BackOffice products
but can be especially important with a product like CRS that is capable of moving
very large amounts of information and consequently having a big impact on network
bandwidth and server performance. When it comes time to implement CRS on your production
environment, you should have a good idea what will happen, based on the tests you've
performed. You want to know how long a typical operation will take, the best time
of day to perform that operation, and the impact a replication project will have
on active Web users.
Pull Projects. A pull project is designed
to connect to a source URL and copy the content it finds there to a specified target
directory on the server that is running the pull project. The server "pulls"
the content from the source, hence the name.
You can either request that all content at the source be pulled or only a specified number of levels be copied. If you specify a limit of two levels, for example, the initial page (typically default.htm or index.htm, depending on how the server is configured) is copied, and the links on that page is followed. The content of the linked pages is copied, and the links contained in them is followed and copied. This is what is meant by two levels deep.
To create a pull project by using the Web Administration tool:
This figure depicts the first page of the Web Administration tool for CRS, a browser-based administration utility that enables you to manage servers, projects, routes, or configuration settings.
The Add Project dialog box enables you to create a project and select the type of replication that you want to use.
The Source/Target page specifies the source and destination for your project.
11. Click OK when you're finished with this project. You can enter additional
projects to monitor or exit the CRS Administration tool by choosing File, Close.
Push Projects. A push project operates
in the reverse manner from a pull project. It's initiated on the source server and
"pushes" content to one or more destination servers. In addition, a push
project must be defined on both the source and destination servers, although only
the source server is configured for a target (destination).
The Projects page lists all active projects and shows their current status. You can remove a project by clicking the waste can icon to the left of the project's name.
In addition to starting a project, the Project Status dialog box can be used to stop an executing project or to roll back (undo) the effects of an earlier replication.
To create a push project with the Web Administration tool:
The Source/Target page for a push project is used to specify the project directory to be replicated, select whether or not to include subdirectories, and add Targets (destinations) for the push event.
Use the Add Target dialog box to specify the target of this replication event. Only one machine can be specified in a target, but multiple targets can be defined for the same project.
This brief introduction to the Content Replication System should give you a solid basis on which to build additional knowledge and experience with this new member of the Microsoft BackOffice family. This product is only in its first release and will undoubtedly continue to be enhanced with additional features and capabilities. With the growing use of the Web and the challenges inherent in managing the large volume of content necessary for a great Web site, the importance of this type of tool will increase.
© Copyright, Macmillan Computer Publishing. All rights reserved.