Method and apparatus for sharing peripheral devices over a network6473783Abstract Disclosed is a system for transparently sharing peripheral devices over a network. The system includes a first computer having at least one peripheral device, and a second computer that is networked to the first computer. The second computer is configured to send a request to use the at least one peripheral device over the network, and the request is processed to determine whether the second computer has sharing privileges to use the at least one peripheral device. Furthermore, the first computer is configured to grant access to the request of the second computer if the second computer has the sharing privileges that enable access to the at least one peripheral device. In this embodiment, the first computer acts as a Server that can share its peripheral devices, and the second computer acts as a Client that access the Server's peripheral devices. Claims What is claimed is: Description BACKGROUND OF THE INVENTION
TABLE A
DEVICE SHARING RIGHTS
DEFAULT SHARING RIGHTS: Default sharing rights are
initially assigned during a first installation of the Server ScanLAN code.
The installation wizards provide an interface to easily set these values.
Note however, that these default sharing rights can also be modified any
time the Server is running by right-clicking on the devices in the Server
application window of FIG. 3C.
PER-CLIENT SHARING RIGHTS: When a Client attaches to a
Server for the first time, the Client is assigned the default sharing
rights.
The Server can then modify the Client's sharing rights to fit the needs of
the individual Clients. This is done in the Server Scan LAN window of
FIG. 3C by right-clicking on the Client name in the left hand pane of the
server application. Another method for changing these values is to double-
click on a Client name in the right-hand pane of the server application.
This brings up the "Client Properties" page.
HOST ADAPTER SHARING RIGHTS: If the sharing rights for a
host adapter are set to "Not Shared", none of the devices connected to that
host adapter will be available.
FIG. 3B shows a screen shot 320 of a ScanLAN Setup wizard in accordance with one embodiment of the present invention. The ScanLAN Setup wizard is well suited to facilitate the loading and configuring of the S/C ScanLAN program on computers that are networked together. By way of example, each computer of a given network may be provided with either the Server ScanLAN application, the Client ScanLAN application, or both the Server and the Client ScanLAN applications, depending on their needs. Accordingly, each computer in the given network can be both a Server and a Client for purposes of using this ScanLAN software. As mentioned above, when the computer is loaded with the Server ScanLAN program, other computers on a network can use the SCSI peripheral devices that are connected to the computer that has the Server ScanLAN application, provided that sharing is allowed. Alternatively, if the computer only has the Client ScanLAN application loaded thereon, the user of that computer will be allowed to use the SCSI peripheral devices that are connected to any one of those computers that have the Server ScanLAN application, provided sharing privileges are allowed. Accordingly, using the ScanLAN Setup wizard of window 320, the user may step through a series of configuration and setup windows. FIG. 3C shows a Server ScanLAN window 340 that is displayed to the user when the Server ScanLAN application is run in accordance with one embodiment of the present invention. As shown, the Server ScanLAN window 340 includes a list of shareable SCSI devices that are physically connected to the computer that has the Server ScanLAN application. By way of example, computer 112b of FIG. 2C has a host adapter 116b, which is connected to the scanner 118, the optical drive 120, and the hard drive 121. Each of these peripheral devices are therefore pictorially shown in a tree orientation depending from the host adapter 116b in the Server ScanLAN window 340. As mentioned above, these peripheral devices will therefore be shareable over the network with computers that have the Client ScanLAN application running. As shown, the network that the computer 112b is connect to has computers 112a, 112c, and 112d identified as Clients 342. For each of the Clients 342, there is also an indication of whether sharing 344 is allowed, and whether each of those Clients is in-use 346. Furthermore, message communication between networked Clients and Servers is also needed to enable efficient and informed sharing of peripheral devices over a network. In one embodiment, the Server ScanLAN is configured to communicate with the Client ScanLAN. These communications are generally in the form of messages, that assist users of the Client ScanLAN's in utilizing the shared peripheral devices in an informed manner. Several exemplary messages are shown below in Table B.
TABLE B
SENDING MESSAGES TO CLIENTS
SHUTDOWN: When the Server is ready to shut down, it will
preferably send a message to all Clients. It is then the responsibility of
the
Clients to detach from the Server.
DEVICE IN USE: If a Client attempts to reserve a device which is
already reserved by another Client, the Server will send a message to the
Client letting it know the particular device requested is busy.
In one embodiment, the S/C ScanLAN uses Microsoft API called remote procedure call (RPC) subsystem in order to send advanced SCSI programming Interface (ASPI) requests (and other requests) across a network. The Microsoft RPC subsystem works well because it uses little overhead while providing acceptable performance across a network. A typical RPC subsystem is based on a Client/Server model of functionality. This means that the Client is free to call upon the Server to perform various tasks whenever the Client desires. Although this method works well, a standard RPC does not provide a way for the Server to call its Clients whenever it desires. For example, the Server is conventionally only allowed to send a message to a Client when the Server is processing a request from a Client. To remedy this problem, a second Client/Server interface is created. In this embodiment, the second Client/Server interface (i.e., a call-back sub-interface) is configured to pass messages from the Server to the Client. To accomplish this, the Server ScanLAN application is set to respond as if it were a Client ScanLAN application, and the Client ScanLAN application is set to respond as if it were a Server ScanLAN application. Once the Client and Server respond as described above for the purpose of sending messages from the Server to the Client, the Server application can send a number of informative messages to the Client during its operation. For example, when a computer running a Server ScanLAN application is about to be shutdown, that Server will send a message to all Clients informing them of the shutdown so they can clean up any of their applications that are using the Server (i.e., a peripheral device that is connected to the Server). Another example of when the Server needs to send a message to the Clients is when a wait queue is accessed, and the Server needs to let the next Client know it can now use a device that is connected to the Server. Other messages may include plug-n-play messaging. Referring back to the Server ScanLAN window 340 of FIG. 3C, the user may select one of the peripheral devices 118, 120, or 121, and then designate them to be "Shared or Not shared" by one of the Clients 342 by right-clicking on one of the Clients 342. For example, as shown in FIG. 3D, when the Client 112d is selected, the user can modify the sharing rights to a particular peripheral device. Window 350 therefore shows the list of devices that are connected to computer 112b that has the Server ScanLAN application. Further, the user is able to view and/or modify the Client's sharing rights by first selecting a device from the list of devices, and then view and/or modify the sharing rights 352. In this example, the scanner 118 is selected and is marked to be shared from the sharing rights 352. Once the sharing rights have been modified in accordance with the user's desire, the sharing rights will become effective once the OK or the APPLY icon is selected from window 350. Of course, the sharing rights of any one of the other peripheral devices or the host adapter can also be modified. FIG. 3E shows a properties window 360 in accordance with one embodiment of the present invention. When the user selects the scanner 118 from the list of devices shown in FIG. 3D, the particular sharing rights for that peripheral device will be appropriately identified. As shown, the scanner 118 is selected to be a "shared" peripheral device. In addition, the properties window 360 shows the device reservation data for that scanner 118. FIG. 3F shows a Client ScanLAN window 370 in accordance with one embodiment of the present invention. The Client ScanLAN window 370 has a general selection 372, which allows the user having the Client ScanLAN application loaded on its computer to enable or disable the Client ScanLAN application. As shown, a user can enable or disable the Client ScanLAN application at any time by selecting that option and clicking on the APPLY button. When the Client ScanLAN is enabled, the user of that computer can use and share SCSI peripherals across the network that are physically connected to a computer having the Server ScanLAN application (provided that Client is given enough sharing privileges by the user of the Server ScanLAN application). On the other hand, when the Client ScanLAN is disabled, the user cannot use or share any SCSI peripheral device across the network. FIG. 3G shows the Client ScanLAN window 370 having a server list 374 selected in accordance with one embodiment of the present invention. As mentioned above, computers that share their SCSI peripheral devices with other computers on a network are called Servers. To use the Server's shared SCSI peripherals, the Server ScanLAN computer name must be added to the server list shown in FIG. 3G. In this embodiment, computer 112b is identified as being a computer that has the Server ScanLAN application loaded thereon. Of course, additional computers having the Server ScanLAN application may also be added to the list or removed at any time. Exemplary Client ScanLAN management functionalities are shown below in Table C.
TABLE C
CLIENT MANAGEMENT
LIST OF CLIENTS: The Server maintains a list of Clients that
have attached to the Server. The Server is also responsible for maintaining
the per-Client sharing rights of all Clients. This information is
persistent
and should be restored each time the Server is launched.
ADD/DELETE CLIENTS: The Server can add and delete Clients
at will. Newly added Clients will receive the default access rights. In one
embodiment, any deleted Clients will not return in the Client list until
the
Client attempts to connect to the Server at a later time.
PLUG-N-PLAY: When devices are added or removed via a plug
and play mechanism, the Server will update itself appropriately.
FIG. 3H is a flowchart diagram 380 illustrating the preferred method operations performed when a client desires the use of a particular device that is connected to a Server in accordance with one embodiment of the present invention. When a Client attempts to access a SCSI device that is connected to a Server, the method will proceed to a decision operation 381. In decision operation 381, the Server first determines whether the Client making the request to access the SCSI device has the proper sharing rights to use the requested device. If the Client does not have the proper sharing rights, the method will end. On the other hand, if the Client has sharing rights for the requested device, the method will proceed to a decision operation 382. In decision operation 382, the Server determines whether anther Client already has the requested device reserved (i.e., another Client is currently using the requested device). If the device is not reserved by another Client, the method will proceed to an operation 383 where the Server reserves the requested device in the name of the requesting Client. The method will then proceed to an operation 385 where the requesting client is allowed to access the requested device. On the other hand, if it is determined in operation 382 that the requested device is already reserved by another Client, the method will proceed to an operation 384. In operation 384, the Server can either fail the Client's request with a "Device Not Ready" return value, or the Server can add the Client's name into a "wait" queue. This wait queue stores Client names on a FIFO (First-In, First-Out) basis. From operation 384, the method proceeds to a decision operation 388 where it is determined whether the Server failed the Client's request. If the Server did fail the Client's request, the method will end. Alternatively, if the Server does not fail the Client's request, the method will proceed to a decision operation 389 where it is determined whether the desired device is available. If it is not, the method will proceed to an operation 390 where the request is placed in the wait queue as described above. When the device becomes available, the method will proceed through operations 383 and 385. In general, Server may now bring the next name off the wait queue, reserve the device for that Client, and send a message informing the Client that it may now use the device it requests. After operation 385, the method will proceed to a decision operation 386 where it is determined whether anther Client desires sharing of a device from a Server. If no other Clients do, the method will end. However, if another Client desires sharing to a peripheral device (i.e., a scanner) that is connected to a computer that has the Server ScanLAN application running, the method will proceed back to decision operation 381. FIG. 4A shows a more detailed flowchart diagram of operation 312 of FIG. 3A, which describes the administering of Client privileges in accordance with one embodiment of the present invention. The administering of Client privileges begins at a decision operation 402, where it is determined if there are any peripheral devices connected to a Server. As described above, the Server can be any computer that is connected to a network and has the Server ScanLAN application loaded thereon. Accordingly, if it is determined in operation 402 that there are peripheral devices connected to the Server, the method will proceed to an operation 404. In operation 404, the host adapters and the peripheral devices that are connected to those host adapters of a Server are listed in a tree view (or any other desired icon view or Windows list). By way of example, FIG. 3C shows the Server ScanLAN window 340 which lists those host adapters and associated peripheral devices that are connected to computer 112b, which has the Server ScanLAN application loaded thereon. On the other hand, if it is determined in operation 402 that there are no peripheral devices connected to the Server, then the method will end because there are no devices that may be shared by the computer having the Server ScanLAN application. Referring now to decision operation 406, where it is determined whether an update to Client sharing privileges is desired. For example, the user may desire to. disable any one of the Clients 342 listed in FIG. 3C from sharing the peripheral devices connected to computer 112b (which acts as a Server) in operation 408. Alternatively, if no updates are desired for Client sharing privileges, the method will proceed to a decision operation 405. In decision operation 405, it is determined if there are any other updates to sharing privileges of adapters or peripheral devices connected to the server computer. If there are, the method will proceed to a decision operation 410. In decision operation 410, it is determined whether an update to adapter sharing privileges is desired. By way of example, if the user desires to no longer share the peripheral devices that are connected to a particular adapter that is connected to the Server computer, this update may be performed by right-clicking on the adapter icon shown in FIG. 3C above, and then modifying the adapter privileges in operation 414. If it is determined in operation 410 that there are no adapter sharing privilege updates, the method will proceed to a decision operation 412. In decision operation 412, it is determined whether other updates are desired. If other updates are desired, the method proceeds to an operation 416 where it is determined if there is an update desired for peripheral device sharing privileges. If there are, those privileges may be modified in operation 418. By way of example, the user may select a particular peripheral device 118, 120, or 121 from the list of shareable SCSI devices of FIG. 3C, and then modify their respective sharing privileges. On the other hand, if it is determined in operation 416 that no update is desired for the sharing of peripheral devices, the method will end. FIG. 4B shows the properties window 360 of FIG. 3E when the advanced button 362 is selected in accordance with one embodiment of the present invention. In the advanced selections, the user is allowed to custom set a reservation time-out value. The reservation time-out value is the amount of time that a computer having the Client ScanLAN software loaded thereon, may remain connection to a particular device without using it before its reservation is removed. By way of example, if a Client computer is connected to a scanner of a Server ScanLAN computer (that is connected to the network), and no activity is detected for X minutes, the reservation will be removed. Accordingly, this time-out value may be modified depending on the number of computers that are networked and the activity a particular peripheral device receives. In addition, the advanced properties will also allow a user to place Clients that wish to access a particular device that is currently being used by another Client in a waiting list. The waiting list therefore will represent a queue of Clients that desire the use of a particular peripheral device that is currently being used by another Client or the Server computer itself. Exemplary device sharing rules are described below in Table D.
TABLE D
DEVICE RESERVATION
ONE AT A TIME: A device can only be reserved by one computer
at a time. If the device is already reserved when another computer attempts
to access the device, the Server sends a message to the Client who is
trying to access the device informing them that the device is currently
reserved by another Client.
SERVER NEEDS TO RESERVE DEVICES: When the Server
uses a device on their own system, the Server application knows this and
will display the word "Server" in the "In Use" field of the left pane of
the
Server application window. No Clients will be allowed to access this
device when the Server has it reserved. Therefore, the Server must also
reserve a device in order to use it just like a remote Client. This
functionality is very important when sharing devices. Although the server
has the ability to remove a reservation on a device, it must be a conscious
decision on the part of the Server user to remove a Client's reservation on
a device. Otherwise, whenever the server desires to use a shared device on
its system, it would bump a Client off, even if it was in the middle of
performing a task.
FREEING A DEVICE: If a device is reserved by a Client, the
Server application can remove the Client's reservation status by right-
clicking on the Client name who has the device reserved and selecting
"Remove Reservation". This option will be disabled in the pop-up menu
if the device is not currently reserved. If the Server has the device
reserved, right-click on any Client name and select the "Remove
Reservation" menu item to free the Server's reservation on a device.
AUTO-RELEASE: Each device has a setting representing the
amount of time (in minutes or the like) that this device may sit idle (no
accesses) while currently reserved by a Client. If another Client is
waiting
to use the device and this time limit has been reached, the Server will
automatically remove the reservation on the device and reserve the device
in the name of the waiting Client. This feature can be enabled/disabled on
a per-device basis as shown in FIG. 4B. Likewise, the time-out value can
be set for each device. If no Client is waiting to use the device and the
time limit is reached, the Server does not have to remove the reservation.
AUTO-RESERVING: If the Server reserves a device for a Client as
described above, the Server is then responsible for sending a message to
the Client who just got the reservation to let it know it can now use
the device.
FIG. 5 shows a flowchart diagram that is a more detailed description of operation 308 of FIG. 3A in accordance with one embodiment of the present invention. The method begins at an operation 502 where it is determined whether the Client desires to use a remote peripheral device (i.e., one that is not connected to the local computer, but is networked to the local computer). If the user does not wish to use a peripheral device that is physically connected to a remote computer that has the Server ScanLAN application, the method will be done. On the other hand, if the user does wish to use a peripheral device that is connected to a remote computer (i.e., a computer having the Server ScanLAN and associated peripheral devices), the method will proceed to an operation 504. In operation 504, the user may enable use of all remote peripheral devices as shown in FIG. 3F above. The method will then proceed to an operation 506 where the user may view and/or modify the list of Servers as shown in FIG. 3G. Next, the method will proceed to an operation 508 where the Client is allowed to run in the background of the computer having the Client ScanLAN application. That is, the user having the Client ScanLAN application running will be able to use other programs on their computer, and access peripheral devices as if those peripheral devices were all connected locally to the Client computer. In general, the Client ScanLAN Application is completely transparent to existing I/O applications. For example, a DeskScan program currently on the market from Hewlett-Packard (HP) of Palo Alto, Calif., is written to provide support for their scanners through a well known ASPI for a Win32 layer. When the ScanLAN code is installed as a Server, which has the scanner installed, the DeskScan program performs exactly as before without modification. Therefore, without any further modifications, the Client ScanLAN machine can now see and use the HP Scanner as if it were connected to the Client's machine once the DeskScan software is installed on the Client. This is what is meant by transparent. In fact, the HP DeskScan program is completely unaware that the scanner is not physically attached to the client system. Accordingly, the only knowledge that a user operating the Client ScanLAN has of the existence of the Client ScanLAN application is a small icon that is displayed in the task bar of a Windows (i.e., 95, 98, etc.) or Windows NT (i.e., 3.51, 4.0, 5.0, etc.) platform. This is particularly advantageous because the use of a Client ScanLAN application will be transparent to the user, and its use does not require additional hardware nor special peripheral devices. Of course, the Client can only share those peripheral devices for which sharing privileges are allowed via the Server ScanLAN application. In one embodiment of the present invention, the ScanLAN application is well suited to operate on a Windows platform. By way of example, in the Windows 95/98 platform, an IPX, NetBEUI, and TCP/IP network protocols are supported, and in the Windows NT Platform, IPX, NetBEUI, TCP/IP and Named Pipes network protocols are supported. In this manner, the above described Microsoft RPC (Remote Procedure Call) and ASPI for Win32 will operate in a good interfacing manner. Of course, suitable modifications may be performed so that the ScanLAN application can function on other operating systems, such as a UNIX operating system, an Apple Computer, Inc. operating system or the like. The invention may employ various computer-implemented operations involving data stored in computer systems to drive computer peripheral devices (i.e., in the form of software drivers and programs). These operations are those requiring physical manipulation of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. Further, the manipulations performed are often referred to in terms, such as producing, identifying, determining, or comparing. Any of the operations described herein that form part of the invention are useful machine operations. The invention also relates to a device or an apparatus for performing these operations. The apparatus may be specially constructed for the required purposes, or it may be a general purpose computer selectively activated or configured by a computer program stored in the computer. In particular, various general purpose machines may be used with computer programs written in accordance with the teachings herein, or it may be more convenient to construct a more specialized apparatus to perform the required operations. An exemplary structure for the invention is described below. FIG. 6 is a block diagram of an exemplary computer system 600 for carrying out the processing according to the invention. The computer system 600 includes a digital computer 602, a display screen (or monitor) 604, a printer 606, a floppy disk drive 608, a hard disk drive 610, a network interface 612, and a keyboard 614. The digital computer 602 includes a microprocessor 616, a memory bus 618, random access memory (RAM) 620, read only memory (ROM) 622, a peripheral bus 624, and a keyboard controller 626. The digital computer 600 can be a personal computer (such as an IBM compatible personal computer, a Macintosh computer or Macintosh compatible computer), a workstation computer (such as a Sun Microsystems or Hewlett-Packard workstation), or some other type of computer. The microprocessor 616 is a general purpose digital processor which controls the operation of the computer system 600. The microprocessor 616 can be a single-chip processor or can be implemented with multiple components. Using instructions retrieved from memory, the microprocessor 616 controls the reception and manipulation of input data and the output and display of data on output devices. According to the invention, a particular function of microprocessor 616 is to assist in the transparent sharing of peripheral devices over a network. The memory bus 618 is used by the microprocessor 616 to access the RAM 620 and the ROM 622. The RAM 620 is used by the microprocessor 616 as a general storage area and as scratch-pad memory, and can also be used to store input data and processed data. The ROM 622 can be used to store instructions or program code followed by the microprocessor 616 as well as other data. The peripheral bus 624 is used to access the input, output, and storage devices used by the digital computer 602. In the described embodiment, these devices include the display screen 604, the printer device 606, the floppy disk drive 608, the hard disk drive 610, and the network interface 612. The keyboard controller 626 is used to receive input from keyboard 614 and send decoded symbols for each pressed key to microprocessor 616 over bus 628. The display screen 604 is an output device that displays images of data provided by the microprocessor 616 via the peripheral bus 624 or provided by other components in the computer system 600. The printer device 606 when operating as a printer provides an image on a sheet of paper or a similar surface. Other output devices such as a plotter, typesetter, etc. can be used in place of, or in addition to, the printer device 606. The floppy disk drive 608 and the hard disk drive 610 can be used to store various types of data. The floppy disk drive 608 facilitates transporting such data to other computer systems, and hard disk drive 610 permits fast access to large amounts of stored data. The microprocessor 616 together with an operating system operate to execute computer code and produce and use data. The computer code and data may reside on the RAM 620, the ROM 622, or the hard disk drive 610. The computer code and data could also reside on a removable program medium and loaded or installed onto the computer system 600 when needed. Removable program mediums include, for example, CD-ROM, PC-CARD, floppy disk and magnetic tape. The network interface 612 is used to send and receive data over a network connected to other computer systems. An interface card or similar device and appropriate software implemented by the microprocessor 616 can be used to connect the computer system 600 to an existing network and transfer data according to standard protocols. The keyboard 614 is used by a user to input commands and other instructions to the computer system 600. Other types of user input devices can also be used in conjunction with the present invention. For example, pointing devices such as a computer mouse, a track ball, a stylus, or a tablet can be used to manipulate a pointer on a screen of a general-purpose computer. The invention can also be embodied as computer readable code on a computer readable medium. The computer readable medium is any data storage device that can store data which can be thereafter be read by a computer system. Examples of the computer readable medium include read-only memory, random-access memory, CD-ROMs, magnetic tape, optical data storage devices. The computer readable medium can also be distributed over a network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion. Although the foregoing invention has been described in some detail for purposes of clarity of understanding, it will be apparent that certain changes and modifications may be practiced within the scope of the appended claims. Accordingly, the present embodiments are to be considered as illustrative and not restrictive, and the invention is not to be limited to the details given herein, but may be modified within the scope and equivalents of the appended claims.
|
Same subclass Same class Consider this |
||||||||||
