TweetFollow Us on Twitter

File, Disk Servers
Volume Number:3
Issue Number:4
Column Tag:Networking Issues

File Servers versus Disk Servers

By Tim Maroney, Software Designer, Centram Systems West

Your kindly editor, Dave Smith, has invited us to clear up some common misperceptions about TOPS, and generally dispel the fog of confusion that surrounds the whole area of networked file systems. A widely distributed Mac magazine recently ran a short piece on the difference between file servers and disk servers that was almost completely wrong, and at trade shows one often hears sales people giving out incorrect information. This article should help people to navigate through the dimly-lit coral reefs of networking.

There are three main approaches to sharing files over a network: file transfer, disk service, and file service. (There is also disk transfer, known to initiates as "the Frisbee method".)

The most venerable approach is file transfer. Most programmers have used file transfer over phone lines; it's much the same over a network. Instead of dialing a phone number, one types in or selects a machine name, but the basic sequence of operations is the same. The user asks to send or receive a file to or from a remote system. Cooperating software on both machines breaks the file up into small packets of data and reliably transfers and acknowledges the packets over the serial line or network. Each packet is sent with a "checksum" or "cyclic redundancy check" value derived by performing a sequence of arithmetic operations on the bytes in the packet. If the receiving machine finds that a packet doesn't match its checksum or CRC, it asks for the packet to be sent again. In this way, the entire file is sent with guaranteed correctness. On serial lines, the protocol is likely to be Kermit or XMODEM; on a network, it is likely to be FTP (File Transfer Protocol).

An open secret of networking is that there is no such thing as a perfect guarantee of correctness. It is possible for a packet to be completely garbaged by line noise, but to coincidentally fall together into an acceptable packet with a valid checksum. It is also possible, as Gamow pointed out, for all the molecules of air in a room to randomly wind up in the same corner of the room and leave any people in the room gasping in a vacuum. It isn't particularly likely, and neither is a network or line error that yields a valid checksum or CRC value.

File transfer is adequate for many applications, particularly keeping libraries of software or literature which people want to download to their machines. However, there are a number of file sharing applications which require a more dynamic approach. For instance, if you have a distributed database, you don't want to have to download it to your machine, make changes, and then upload it back to the original machine. In a multiple-engineer programming product, it might be desirable to keep the sources on a central machine and have everyone work from the same copies, while actually using their own microcomputers. Sometimes you have only one hard disk but three people need to have a few megabytes each at the same time. And so forth. For these kinds of applications, disk service or file service is more suitable.

Disk service and file service look similar to a human user, but the implementations are different in significant ways. In both cases, though, the idea is to make disk storage that is connected to another machine seem to be directly connected to your machine. On the Mac, that means (from a user's perspective) that a remote disk volume appears with a disk icon in the Finder, and can also be seen inside the Standard File Package, so that the files on the remote disk can be used just like local files. The term "transparency" is usually used to refer to this kind of file access; the fact that the file actually resides on another system is transparent (invisible) to software. In other words, transparency of disk or file service means that old programs still work, without having to put out new versions.

You can see that file transfer is actually a functional subset of disk service or file service. Network file transfer can be done in the Finder on the Mac using TOPS or MacServe, without requiring a special transfer utility; all you have to do is drag the remote file to a local (or even another remote) volume or folder.

In just about every operating system on the planet, there are two levels of file access. The programmer uses high-level file operations, like open, read, write, close, and so forth. High-level file operations are translated by the operating system into low-level disk operations involving physical disk block reads and writes. Low-level operations are usually structured as calls to any of several lookalike disk drivers, pieces of software in the OS that deal with the details of communicating with the disk controller. An operating system is associated with a particular disk format, which is the same from disk to disk. That is, regardless of whether you have a DataFrame or an HD20 connected to your Mac Plus, the first two blocks on the disk contain system startup information, the third volume information, and so forth, even though two different disk drivers are used to talk to the disks, and the disks represent their blocks differently at the physical level.

Disk service intercepts file operations at the level of the disk driver. File service, however, intercepts file operations in the high level operations. This leads to some important differences in the power and performance of the two approaches.

In disk service, a disk (or possibly a simulated disk) on a remote machine is accessed by the operating system just like a local disk; physical disk block reads and writes go directly over the network. Disk service uses a disk driver that goes to the network instead of to a local file device. You could say that the network is being used like a long SCSI cable. Disk service is very simple to implement; a friend once claimed that he could write a complete disk server in under two hours.

Clearly, disk service is bound by disk formats, and so it does not work very well, if at all, between different operating systems. A Mac and a PC want to see very different things on their disks. It is possible, though difficult and expensive, to let each understand the other's format; for instance, an external file system could be written on the Mac to understand PC-format disks. However, there is a combinatorial explosion associated with adding more formats. Each new system's format has to be implemented on each already supported system, requiring lots of coding effort, and lots of code space overhead on each machine.

Disk service does not easily permit file sharing between users. Disk service uses an existing, unmodified or only very slightly modified, disk format, the format that came with the operating system. Disk formats do not typically allow easy synchronization of multiple users, because they are intended to be used only by a single local machine. This means that only one person can mount a network disk at one time, unless elaborate operating system interceptions and synchronization protocols are developed. If such interceptions and protocols are done, then disk service is no longer simpler than file service; and this simplicity was really its only benefit.

One approach to inter-operating-system disk service is to partition a server's disk, and format each partition to the dictates of a different OS. To share files between operating systems, a special utility is used to copy across partitions. This is the approach used by 3-Com. This allows dynamic file sharing between machines using the same operating system (sometimes), but between operating systems it is really just file transfer. Using simulated disks has some of the same problems as partitioning; for instance, you could allocate a one megabyte file on a VMS system and use disk service software to make a Mac think this VMS file is really a block-structured Mac disk, but people on VMS are not going to be able to get any useful information out of the file without using special copying utilities.

In file service, high-level file system operations like open, read, write, lock, and so forth go over the network instead of disk block requests. In many file service protocols (e.g., TOPS, NFS, and CMU's VICE), a remote function call protocol is used for support: this allows one machine to make function calls that are executed on another machine. File service is usually very hard to implement well; TOPS took about two years, and VICE took even longer to become a usable system.

However, once file service is done, there are some very tangible benefits over disk service. The most tangible, to a naive end user, is that remote disks can be shared; more than one person can have access to the same directories and volumes at one time. No special synchronization protocol is needed.

Another very tangible benefit is an inter-operating-system capability. Most operating systems have similar high-level file operations, like open, read, seek, and so forth. There are differences, but they can almost always be bridged without losing compatibility. TOPS is a standard for file system operations regardless of operating system, and was simultaneously developed on two operating systems: that's how we were able to get the PC and the Mac to communicate, and why our UNIX and forthcoming OS implementations are proceeding smoothly. Some other file service protocols are less OS independent; for instance, VICE is very specific to 4.2bsd UNIX, and a new protocol, SNAP, had to be added to allow VICE machines to share files with microcomputers.

Another benefit is that considerably more clever and powerful things can be done in file service. VICE uses a whole-file local caching scheme that speeds up file access tremedously for workstations that have their own disks. A file service protocol can be extended easily to cope with the demands of new operating systems, without encountering the combinatorial explosion of disk service. Disk servers, because of the lack of file sharing, do not usually allow a machine to serve as both client and server, or to function as one node in a homogeneous network namespace; these things can be added to file service relatively easily.

File servers are often faster than disk servers. TOPS, a file server, is faster than MacServe, a disk server, according to InfoWorld (11/86) and MacWorld (10/86). This might seem puzzling, since disk service is simpler than file service. We aren't entirely sure, but we think that it is the result of disk service's need to pass directory and map blocks over the network to do directory, seek, and grow operations. In file service, this is all done locally on the server machine, accomplishing in a single network operation what takes two or more with disk service. Of course, local operations are faster than network operations, just as eating everything at the table is faster than walking to the kitchen to fetch each mouthful. Believe me, I have tried this many times. So contrary to first impressions, a file server can often be expected to perform better than a disk server.

Some brief design notes might be helpful. TOPS is a name used for both a network protocol and the TOPS product which implements the protocol. The TOPS protocol is built on a lower-level protocol called RFP, for Remote Function Protocol. Using RFP, it is possible to make function calls that will be executed on another system. RFP itself is built on top of the Appletalk Transaction Protocol (ATP), and will soon be ported to run on the Internet Transmission Control Protocol (TCP) as well. RFP is an asymmetrical protocol; it has a client end, which makes remote calls and receives their values, and a server end, which receives remote calls, executes them locally, and returns the result to the client that initiated the call.

The TOPS protocol is a set of function definitions that are passed over the network using RFP. These include functions to open files, read and write buffers, lock files and byte ranges, get information on files and directories, and so forth. When some software on the Mac makes a file system call that has to do with a remote file, this system call is intercepted and translated into a TOPS call. RFP's client end is then used to make this TOPS call remotely on the system where the file is actually stored. The RFP server end on the machine containing the file executes the TOPS call locally, which means calling the local file system, and returns the result to the client. Because everything goes through TOPS, the two machines may have completely different operating systems. All that is needed is for the TOPS client software to translate local file system operations into TOPS operations, and for the TOPS server to translate TOPS operations into local file system operations.

The Apple Filing Protocol (AFP) and Sun's Network File System (NFS) use somewhat similar designs. With AFP, a protocol called ASP (Apple Session Protocol) is used for remote function calling. Actually, ASP does less than RFP, since it does not itself interpret the data in the packets, deferring this to a sort of implied remote function call layer in AFP itself. (Pay attention; this will be on the test.) ASP sits on top of ATP; like AFP, it was co-developed by Centram and Apple. NFS uses a protocol called RPC (Remote Procedure Call), which uses a sub-protocol known as XDR (External Data Reference) to define its data formats. RPC sits on top of the Internet User Datagram Protocol (UDP).

There were some comments on TOPS from "MacoWaco" in the January 1987 issue of MacTutor which were not quite accurate regarding use of Apple's "File Structure". I don't know what he means by "Apple's File structure". The most likely interpretation seems to be the Apple Filing Protocol, AFP for short. This is an Apple protocol for network file service. The design of AFP is similar to the design of the TOPS protocol. AFP is still being refined within Apple; when it is finalized later this year, TOPS will become fully compatible with it. MacServe, however, cannot be compatible with AFP. Its disk service approach is fundamentally incompatible with the file service approach employed by both TOPS and AFP. Another possible interpretation of "Apple's File structure" pertains to disk format. TOPS uses disks as they are, with no modifications needed, while MacServe requires reformatting and partitioning disks before they can be used.

Appletalk runs at about one quarter megabit per second, because this is the fastest speed the SCC will handle without special clocking. Ethernet runs at three or ten megabits per second, twelve or forty times as fast. It should be noted, though, that most network protocol implementations cannot drive a network at a full bandwidth of multiple megabits per second; an Ethernet tends to be idle a lot of the time, but it's still effectively many times faster than Appletalk, but then again, many times more expensive to implement. The new Macs will allow customers to match their pocketbooks with their bandwidth requirements.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Whitethorn Games combines two completely...
If you have ever gone fishing then you know that it is a lesson in patience, sitting around waiting for a bite that may never come. Well, that's because you have been doing it wrong, since as Whitehorn Games now demonstrates in new release Skate... | Read more »
Call of Duty Warzone is a Waiting Simula...
It's always fun when a splashy multiplayer game comes to mobile because they are few and far between, so I was excited to see the notification about Call of Duty: Warzone Mobile (finally) launching last week and wanted to try it out. As someone who... | Read more »
Albion Online introduces some massive ne...
Sandbox Interactive has announced an upcoming update to its flagship MMORPG Albion Online, containing massive updates to its existing guild Vs guild systems. Someone clearly rewatched the Helms Deep battle in Lord of the Rings and spent the next... | Read more »
Chucklefish announces launch date of the...
Chucklefish, the indie London-based team we probably all know from developing Terraria or their stint publishing Stardew Valley, has revealed the mobile release date for roguelike deck-builder Wildfrost. Developed by Gaziter and Deadpan Games, the... | Read more »
Netmarble opens pre-registration for act...
It has been close to three years since Netmarble announced they would be adapting the smash series Solo Leveling into a video game, and at last, they have announced the opening of pre-orders for Solo Leveling: Arise. [Read more] | Read more »
PUBG Mobile celebrates sixth anniversary...
For the past six years, PUBG Mobile has been one of the most popular shooters you can play in the palm of your hand, and Krafton is celebrating this milestone and many years of ups by teaming up with hit music man JVKE to create a special song for... | Read more »
ASTRA: Knights of Veda refuse to pump th...
In perhaps the most recent example of being incredibly eager, ASTRA: Knights of Veda has dropped its second collaboration with South Korean boyband Seventeen, named so as it consists of exactly thirteen members and a video collaboration with Lee... | Read more »
Collect all your cats and caterpillars a...
If you are growing tired of trying to build a town with your phone by using it as a tiny, ineffectual shover then fear no longer, as Independent Arts Software has announced the upcoming release of Construction Simulator 4, from the critically... | Read more »
Backbone complete its lineup of 2nd Gene...
With all the ports of big AAA games that have been coming to mobile, it is becoming more convenient than ever to own a good controller, and to help with this Backbone has announced the completion of their 2nd generation product lineup with their... | Read more »
Zenless Zone Zero opens entries for its...
miHoYo, aka HoYoverse, has become such a big name in mobile gaming that it's hard to believe that arguably their flagship title, Genshin Impact, is only three and a half years old. Now, they continue the road to the next title in their world, with... | Read more »

Price Scanner via MacPrices.net

B&H has Apple’s 13-inch M2 MacBook Airs o...
B&H Photo has 13″ MacBook Airs with M2 CPUs and 256GB of storage in stock and on sale for up to $150 off Apple’s new MSRP, starting at only $849. Free 1-2 day delivery is available to most US... Read more
M2 Mac minis on sale for $100-$200 off MSRP,...
B&H Photo has Apple’s M2-powered Mac minis back in stock and on sale today for $100-$200 off MSRP. Free 1-2 day shipping is available for most US addresses: – Mac mini M2/256GB SSD: $499, save $... Read more
Mac Studios with M2 Max and M2 Ultra CPUs on...
B&H Photo has standard-configuration Mac Studios with Apple’s M2 Max & Ultra CPUs in stock today and on Easter sale for $200 off MSRP. Their prices are the lowest available for these models... Read more
Deal Alert! B&H Photo has Apple’s 14-inch...
B&H Photo has new Gray and Black 14″ M3, M3 Pro, and M3 Max MacBook Pros on sale for $200-$300 off MSRP, starting at only $1399. B&H offers free 1-2 day delivery to most US addresses: – 14″ 8... Read more
Department Of Justice Sets Sights On Apple In...
NEWS – The ball has finally dropped on the big Apple. The ball (metaphorically speaking) — an antitrust lawsuit filed in the U.S. on March 21 by the Department of Justice (DOJ) — came down following... Read more
New 13-inch M3 MacBook Air on sale for $999,...
Amazon has Apple’s new 13″ M3 MacBook Air on sale for $100 off MSRP for the first time, now just $999 shipped. Shipping is free: – 13″ MacBook Air (8GB RAM/256GB SSD/Space Gray): $999 $100 off MSRP... Read more
Amazon has Apple’s 9th-generation WiFi iPads...
Amazon has Apple’s 9th generation 10.2″ WiFi iPads on sale for $80-$100 off MSRP, starting only $249. Their prices are the lowest available for new iPads anywhere: – 10″ 64GB WiFi iPad (Space Gray or... Read more
Discounted 14-inch M3 MacBook Pros with 16GB...
Apple retailer Expercom has 14″ MacBook Pros with M3 CPUs and 16GB of standard memory discounted by up to $120 off Apple’s MSRP: – 14″ M3 MacBook Pro (16GB RAM/256GB SSD): $1691.06 $108 off MSRP – 14... Read more
Clearance 15-inch M2 MacBook Airs on sale for...
B&H Photo has Apple’s 15″ MacBook Airs with M2 CPUs (8GB RAM/256GB SSD) in stock today and on clearance sale for $999 in all four colors. Free 1-2 delivery is available to most US addresses.... Read more
Clearance 13-inch M1 MacBook Airs drop to onl...
B&H has Apple’s base 13″ M1 MacBook Air (Space Gray, Silver, & Gold) in stock and on clearance sale today for $300 off MSRP, only $699. Free 1-2 day shipping is available to most addresses in... Read more

Jobs Board

Medical Assistant - Surgical Oncology- *Apple...
Medical Assistant - Surgical Oncology- Apple Hill Location: WellSpan Medical Group, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Apply Read more
Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Business Analyst | *Apple* Pay - Banco Popu...
Business Analyst | Apple PayApply now " Apply now + Apply Now + Start applying with LinkedIn Start + Please wait Date:Mar 19, 2024 Location: San Juan-Cupey, PR Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.