[cups.development] [RFE] STR #3149: Optimized CUPS polling

angelb angelb at bugarin.us
Tue Mar 31 13:14:26 PDT 2009


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Since printer management are done on the CUPS server(s), what if
changes are logged and only those changes are sent to the polling
client instead of the entire printers in the list all the time?

For example:

1. A new client polls the server for the printers list for the first
   time.

2. When all printers are received, polling goes to sleep, and a file
   cache containing the printers in the list is created in the
   localhost. At this moment of time, the client has the latest
   printers in its memory and file cache from the server(s).

3. On the server, a printer queue is deleted, a new printer queue is
   created, and an existing printer queue is changed. These updates are
   also saved in a file cache of changes in the server.

4. The client polling wakes up. The polling daemon sees a file cache
   exist in the localhost and begins to poll changes from the server's
   file cache and updates its own local file cache.

5. Once the client received all updates into its file cache, it reads
   the file cache into memory and polling goes back to sleep until next
   interval.

This method of printer update would be much quicker and less CPU
intensive than the current method, whether 10 printer queues or 10k
queues, since only true changes are read and written.

Thanks.

Link: http://www.cups.org/str.php?L3149
Version:  -feature





More information about the cups mailing list