Offline Files
Win2K Pro's new caching feature provides speed, availability, reliability, and laptop support.
November 15, 1999
Cache in on one of Windows 2000's best features
Although many of Windows 2000's (Win2K's) obvious benefits come from the three server products, the OS's workstation incarnation—Win2K Professional (Win2K Pro)—offers a particularly powerful feature called offline files. This month, I explore how offline files can make your network seem faster, make network files accessible when the network is down, prevent you from losing work if the network fails, and let laptop users access network files without connecting to the network.
Users store most of their data on local hard disks or network servers. Accessing local hard disks and accessing network servers involve two very different sets of programming concepts. Local hard disk access requires physical disk numbers, knowledge of the bus the disk is on (i.e., IDE or SCSI), and hardware-specific location information (e.g., a particular cylinder/head/sector combination, a particular logical sector number). In contrast, network access requires protocol knowledge (i.e., whether you can access a file server via NetBEUI, IPX, TCP/IP, or a combination of protocols), information about the underlying file-sharing protocols (e.g., Microsoft's Server Message Block—SMB, Novell's NetWare Core Protocols), server names, routing information, and so on. However, you can use the same commands to access data on a local hard disk or a network server because PC network operating system (NOS) designers created pieces of software that mask the differences between accessing data in the two locations. Such software has been referred to as shells, redirectors, and network client software; I prefer the term redirector. Every Microsoft OS since Windows for Workgroups (WFW) 3.1 has included a redirector of some kind. In fact, most Microsoft OSs since WFW have let you load more than one vendor's redirector, which was an important feature in the early 1990s when Microsoft ruled the desktop but Novell ruled the network.
Win2K Pro's redirector, which communicates with Microsoft servers, is Client for Microsoft Networks. This redirector includes a tool called offline files that lets your system use the network far more intelligently than it did in previous Microsoft OSs. The core of this intelligence is a simple feature that OSs use extensively: caching. The premises behind caching are that users repeatedly visit the same places on the network and that network servers respond more slowly than local hard disks. Thus, the redirector keeps copies of (i.e., caches) network files that you use often in a hidden directory on the local hard disk.
Offline files makes your network seem faster when you repeatedly access the same network files. The first time you access a file on the network, offline files copies the file to the hidden directory winntcsc. The next time you access that file on the network, offline files first looks in the cache on the local hard disk to see whether the cache contains a copy of the file. If the cache contains a copy of the file, offline files compares the time, date, and size of the cache file with the time, date, and size of the network server file. If the time, date, and size of the two files match, offline files accesses the local copy rather than asking the server to redeliver the file and thus clog the network.
Another benefit is that offline files lets you access files when the network is down. Suppose you're preparing a Microsoft PowerPoint presentation for a meeting and you want to incorporate some slides from another presentation that is on a network server, but the server is down. Perhaps the server is rebooting, or maybe one of its routers isn't functioning—whatever the reason, your system's redirector can't access the files on the server. However, you looked at the presentation a few days ago, and your cache still contains a copy of the file. Offline files can access this copy of the file and deliver it to you with nary a hiccup. The only indication you get that the server is offline is a small icon that appears in your system tray and a small message balloon that pops up for a few seconds to advise you that the server is in offline mode.
Offline files is additionally useful because it prevents you from losing work in the event of a network failure. For example, when you open and edit a Microsoft Word document directly from a file server, you risk the document's integrity. Word accesses an open file every few minutes (e.g., to perform an autosave, to access part of the file on the file server); if the network fails for even a second during this network access, Word drops the document and often trashes the copy on the server as well. Offline files prevents this occurrence because it senses that the desired server isn't responding and thus puts the server in offline mode, at least from the redirector's viewpoint. (The server isn't offline, but your workstation thinks it is.) Offline files then saves the updated files to its local cache and lies to Word, telling the program, "Don't worry, everything's fine; the server is running." When the server comes back online, offline files informs you that the server is available again and offers to synchronize the offline files (i.e., to flush the files in its local cache and write copies of the files to the server).
Finally, offline files lets laptop users access network files without connecting to the network. Suppose you're sitting on a plane and you need a file that is on a server at the office. You can't connect to the network, but if you open My Network Places (Win2K Pro's version of Network Neighborhood), you can see all the shares you access frequently. In addition, you can access files in those shares. When offline files caches files on the network, it keeps track of the servers and shares where it finds the files. Offline files then tells My Network Places that those servers are online and available. But when you access those servers, you don't see all their files and folders—you see only the files and folders that offline files cached.
You might wonder how offline files decides which files to cache. The feature caches only the files you tell it to. If you right-click a network file in Win2K Pro, you see the option Make Available Offline. Selecting this option tells offline files to keep a local copy of the file. Offline files then checks with the file's server periodically to ensure that you have the most current version of the file. Forcing offline files to cache a file or folder is called pinning the file or folder. You can have as many pinned files or folders as you want on your system, within the restrictions of your system's disk space. Using a separate drive for caching would increase this limit, but I haven't figured out how to force offline files to use another drive.
Offline files also caches files that you don't ask it to. You designate a percentage of your system disk that you're willing to let offline files use for disk caching. Offline files then keeps locally cached copies of the network files that you access, until it fills up the disk space you allotted. When the space is full, offline files starts discarding from the cache the files that you've accessed least recently and replaces them with newer files.
Win2K file shares are cacheable by default. But as a network administrator, you might not want offline files to cache certain files. If a file is on a Win2K file server, you can designate the file as noncacheable. You accomplish this task through Win2K's administrative user interface (UI) that configures file shares. If you designate a file as noncacheable, users won't see the Make Available Offline option when they right-click the file.
Of course, offline files' file caching is more complicated than what I've covered in this column. Tune in next month for information about how to see what's in the local cache and how to control synchronization between the local cache and the server.
About the Author
You May Also Like