The present invention is illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which like reference numerals refer to similar elements and in which:
In the following description, for the purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, that the present invention may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form in order to avoid unnecessarily obscuring the present invention.
With reference to
Printing device 210 represents a printing device executing an attribute request handler 212 for processing requests for attribute data (e.g. metadata) of printing device 210. Printing device 210 may be implemented by any type of device that is capable of processing print data received from client device 220 and generate printed versions of electronic documents reflected in the print data. Printing device 210 may also comprise a print process 214 that receives and processes the print data in order to generate printed versions of electronic documents reflected in the print data.
References herein to the term “printing device” are not limited to a device that provides only printing services. “Printing device” may be any device that is capable of performing printing functions. Many printing devices today provide functionality in addition to printing, e.g. copying and scanning, and therefore references to “printing device” include such devices.
Client device 220 represents a client machine executing a client application 222 and a printer driver 224. Client application 222 may be any application that is capable of initiating requests for printing hard copies of electronic documents. Client application 222 may be, for example, a word processor that generates electronic documents or opens existing electronic documents for printing on printing device 210. Other examples of client application 222 include, without limitation, spreadsheet programs, graphics programs, financial applications, etc.
Printer driver 224 may be any process that is capable of transmitting requests for printing documents. Printer driver 224 may be logically part of client application 222 or may be a separate executing process, as shown. Printer driver 224 controls communications between client device 220 and printing device 210, either directly (via network 240) or indirectly through printer manager 230. Printer driver 224 is used as an intermediary to translate communications from other computer programs into a language that printing device 210 can understand. The use of a printing driver facilitates printer device independence. For example, when client application 222 is a word processing program, the word processing program does not (conventionally) directly instruct printing device 210 on how to print a particular page from an electronic document. Instead, client application 222 may instruct an operating system associated with client device 220 to send the page that is to be printed to printing device 210. The operating system forwards the page to printer driver 224. Printer driver 224 converts the page into a format that printing device 210 can understand.
Printer manager 230 is responsible for automatically registering printing devices (e.g. printing device 210). Printer manager 230 may also be responsible for forwarding requests between client device 220 and printing device 210, such as print requests and eventing information. Printer manager 230 may comprise an agent process 232 and a printer registrar 234. Agent process 232 executes on printer manager 230 and handles communications between itself and one or more printing devices. Such communications may include: 1) a message from a printing device indicating that the printing device is available to handle print requests (e.g. HELLO message), 2) a request for attribute data of the printing device, 3) a response indicating the values of attributes of the printing device, and 4) a message from a printing device indicating that the printing device is no longer available to handle print requests (e.g. BYE message). Agent process 232 may also be responsible for accessing a driver for a printing device from which attribute data was recently received.
Agent process 232 registers a printing device with printer registrar 234. Printer registrar 234 may be a database of organized information that associates attribute (i.e. registration) data with each printing device registered with printer manager 230. Attribute data includes at least one of the following attributes of a printing device: name, model, location, network address, capabilities, and the URL of a driver associated with the printing device. Printer registrar 234 may also maintain attribute data pertaining to printing devices that have been un-registered.
Agent process 232 and attribute request handler 212 may communicate using various protocols. Communications may be sent and received using Web Services protocols including Web Services Discovery, Web Services MetadataExchange, Web Services Security, and Web Services Eventing. These protocols provide a platform-independent way to, respectively, discover devices, exchange device and service metadata, enable secure messaging, and process eventing information so that devices from independent vendors may communicate with each other.
Network 240 may be implemented by any medium or mechanism that provides for the exchange of data between various nodes in the network. Examples of network 240 include, without limitation, a network such as a Local Area Network (LAN), Wide Area Network (WAN), Ethernet or the Internet, or one or more terrestrial, satellite, or wireless links. Network 240 may include a combination of networks such as those described. Network 240 may transmit data according to Transmission Control Protocol (TCP) and Internet Protocol (IP).
At step 1, printing device 210 transmits notification data (e.g. a HELLO message) to agent process 232 indicating that printing device 210 is available to process print data. This notification data may be a multicast message. It is possible that the notification data is transmitted to agent process 232 in response to a discovery request (e.g. using WS-Discovery) sent by agent process 232 throughout network 240 to discover newly added devices, such as printing devices, in which case the notification data would be a unicast message.
In response to the notification data, agent process 232 generates and transmits to attribute request handler 212 a request (e.g. a unicast message) for attribute data of printing device 210 (step 2). The request may conform to any format or protocol depending upon a particular implementation. At step 3, attribute request handler 212 generates and transmits to agent process 232 a message indicating a reply message that includes one or more attribute values of one or more attributes of printing device 210.
The reply may include values of any type of attribute of printing device 210, depending upon a particular implementation. One of the attribute values in the message in step 3 may include location data that is used to access a driver for printing device 210. An example of location data is a Uniform Resource Locator (URL).
Therefore, using the location data, agent process 232 accesses (e.g. downloads) a driver for printing device 210 so that client application 222 may send requests to printing device 210 to print electronic documents (step 4). Client device 220 may send a request to printer manager 230 to retrieve the driver (e.g. when client device 220 queries printer manager 230 for available printing devices). Alternatively, agent process 232 may automatically provide the driver to client device 220. In another embodiment, agent process 232 forwards the location data (e.g. URL) to client device 220 to allow client device 220 to access the driver.
At step 5, agent process 232 registers printing device 210 with printer registrar 234. Printer registrar 234 may be a process that directs the storage of the attribute data received in step 3 instead of simply a database of registration data as described above. Therefore, printer registrar 234 may receive and respond to requests for storing attribute data, as well as requests for retrieving attribute data. The attribute data may be stored on a device separate from printer manager 230.
At step 6, agent process 232 may provide identifying information that identifies printing device 210 to client application 222. Alternatively, to avoid continually sending unsolicited messages to client devices, agent process 232 provides the identifying information to client application 222 only in response to agent process 232 receiving a request from client application 222 for available (i.e. registered) printing devices. Identifying information may include any or all of the attribute values sent by printing device 210 to agent process 232 in step 3, such as the network address of printing device 210. Identifying information may also include the driver for printing device 210. Once printing device 210 is registered with printer manager 230 and client application 222 has information identifying printing device 210, client application 222 may send printing device 210 requests, e.g. via printer driver 224, to print data. Client application 222 may send these requests directly to printing device 210. Alternatively, client application 222 may send these requests to agent process 232 (step 7), which forwards the requests to printing device 210 (step 8).
It is not necessary that agent process 232 performs each of steps 6, 7 and 8. Therefore, according to one embodiment, printer registrar 234 is configured to perform one or more of steps 6, 7, and 8.
If printing device 210 is unavailable to process print data for any reason, such as when printing device 210 is taken offline to make repairs then, in step 9, printing device 210 may be configured to send a message indicating that printing device 210 is no longer available to process print data (e.g. BYE message). However, in some cases, printing device 210 may go offline without being able to send any message to agent process 232. For example, the power supply to printing device 210 may have been disconnected from printing device 210. In such cases, therefore, only by periodically probing printing device 210 will agent process 232 determine that printing device 210 is unavailable to process print data.
If printing device 210 does not respond to one (or more) of the probes, or if printing device 210 sends, e.g. a BYE message to agent process 232, then in response, agent process 232 updates the status of printing device 210 to “offline” (or un-registers printing device 210), e.g. by notifying printer registrar 234 (step 10). Printer registrar 234 may delete all information associated with printing device 210, such as the attribute data of printing device 210. Agent process 232 or printer registrar 234 may notify client device 220 that printing device 210 is unavailable before or after any requests to process print data is received from client device 220. Agent process 232 or printer registrar 234 may make this notification to all client devices to which agent process 232 sent identifying information or just to those client devices that have queried printer manager 230 for registered printing devices.
If, at step 406, it is determined that the printing device has already been registered, then the process flow proceeds to step 416, where it is determined whether the printing device is “offline.” If so, then the HELLO message indicates that the printing device is available once again to process print data and the status of the printing device is updated in step 418 (e.g. “ready” status). If the printing device is not “offline”, then the process flow proceeds to step 414.
If, at step 404, it is determined that the message is not a HELLO message, then it is determined whether the message is a BYE message (step 420). If not, then the process flow proceeds to step 414 indicating that agent process 232 only performs the steps relating to registering and un-registering printing devices. Therefore, another process executing on printer manager 230 may handle print requests to print data if printer manager 230 acts as a router of such requests.
If, at step 420, the message is a BYE message, then it is determined whether the printing device that sent the BYE message is registered with printer manager 230 (step 422). If so, then agent process 232 updates the printing device to “offline” (step 424) by, e.g. notifying printer registrar 234, and the process flow proceeds to step 414. Alternatively, agent process 232 may un-register the printing device from printer registrar 234. If the printing device that sent the BYE message is not registered with printer manager 230, then process flow proceeds directly to step 414.
The approach described herein for automatically registering printing devices may be implemented on any type of computing platform or architecture.
Computer system 500 may be coupled via bus 502 to a display 512, such as a cathode ray tube (CRT), for displaying information to a computer user. An input device 514, including alphanumeric and other keys, is coupled to bus 502 for communicating information and command selections to processor 504. Another type of user input device is cursor control 516, such as a mouse, a trackball, or cursor direction keys for communicating direction information and command selections to processor 504 and for controlling cursor movement on display 512. This input device typically has two degrees of freedom in two axes, a first axis (e.g., x) and a second axis (e.g., y), that allows the device to specify positions in a plane.
The invention is related to the use of computer system 500 for implementing the techniques described herein. According to one embodiment of the invention, those techniques are performed by computer system 500 in response to processor 504 executing one or more sequences of one or more instructions contained in main memory 506. Such instructions may be read into main memory 506 from another machine-readable medium, such as storage device 510. Execution of the sequences of instructions contained in main memory 506 causes processor 504 to perform the process steps described herein. In alternative embodiments, hard-wired circuitry may be used in place of or in combination with software instructions to implement the invention. Thus, embodiments of the invention are not limited to any specific combination of hardware circuitry and software.
The term “machine-readable medium” as used herein refers to any medium that participates in providing data that causes a machine to operation in a specific fashion. In an embodiment implemented using computer system 500, various machine-readable media are involved, for example, in providing instructions to processor 504 for execution. Such a medium may take many forms, including but not limited to, non-volatile media, volatile media, and transmission media. Non-volatile media includes, for example, optical or magnetic disks, such as storage device 510. Volatile media includes dynamic memory, such as main memory 506. Transmission media includes coaxial cables, copper wire and fiber optics, including the wires that comprise bus 502. Transmission media can also take the form of acoustic or light waves, such as those generated during radio-wave and infra-red data communications.
Common forms of machine-readable media include, for example, a floppy disk, a flexible disk, hard disk, magnetic tape, or any other magnetic medium, a CD-ROM, any other optical medium, punchcards, papertape, any other physical medium with patterns of holes, a RAM, a PROM, and EPROM, a FLASH-EPROM, any other memory chip or cartridge, a carrier wave as described hereinafter, or any other medium from which a computer can read.
Various forms of machine-readable media may be involved in carrying one or more sequences of one or more instructions to processor 504 for execution. For example, the instructions may initially be carried on a magnetic disk of a remote computer. The remote computer can load the instructions into its dynamic memory and send the instructions over a telephone line using a modem. A modem local to computer system 500 can receive the data on the telephone line and use an infra-red transmitter to convert the data to an infra-red signal. An infra-red detector can receive the data carried in the infra-red signal and appropriate circuitry can place the data on bus 502. Bus 502 carries the data to main memory 506, from which processor 504 retrieves and executes the instructions. The instructions received by main memory 506 may optionally be stored on storage device 510 either before or after execution by processor 504.
Computer system 500 also includes a communication interface 518 coupled to bus 502. Communication interface 518 provides a two-way data communication coupling to a network link 520 that is connected to a local network 522. For example, communication interface 518 may be an integrated services digital network (ISDN) card or a modem to provide a data communication connection to a corresponding type of telephone line. As another example, communication interface 518 may be a local area network (LAN) card to provide a data communication connection to a compatible LAN. Wireless links may also be implemented. In any such implementation, communication interface 518 sends and receives electrical, electromagnetic or optical signals that carry digital data streams representing various types of information.
Network link 520 typically provides data communication through one or more networks to other data devices. For example, network link 520 may provide a connection through local network 522 to a host computer 524 or to data equipment operated by an Internet Service Provider (ISP) 526. ISP 526 in turn provides data communication services through the world wide packet data communication network now commonly referred to as the “Internet” 528. Local network 522 and Internet 528 both use electrical, electromagnetic or optical signals that carry digital data streams. The signals through the various networks and the signals on network link 520 and through communication interface 518, which carry the digital data to and from computer system 500, are exemplary forms of carrier waves transporting the information.
Computer system 500 can send messages and receive data, including program code, through the network(s), network link 520 and communication interface 518. In the Internet example, a server 530 might transmit a requested code for an application program through Internet 528, ISP 526, local network 522 and communication interface 518.
The received code may be executed by processor 504 as it is received, and/or stored in storage device 510, or other non-volatile storage for later execution. In this manner, computer system 500 may obtain application code in the form of a carrier wave.
In the foregoing specification, embodiments of the invention have been described with reference to numerous specific details that may vary from implementation to implementation. Thus, the sole and exclusive indicator of what is the invention, and is intended by the applicants to be the invention, is the set of claims that issue from this application, in the specific form in which such claims issue, including any subsequent correction. Any definitions expressly set forth herein for terms contained in such claims shall govern the meaning of such terms as used in the claims. Hence, no limitation, element, property, feature, advantage or attribute that is not expressly recited in a claim should limit the scope of such claim in any way. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.