Server/Client printer updates
angelb
angelb at bugarin.us
Mon Mar 30 07:10:41 PDT 2009
Hello all. Just want to know if someone has already come up with simillar
suggestion or if this is worth sending to feature request.
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.
Obviously, I didn't think this through thoroughly. I don't know enough about
CUPS and its internals. I just want to see if a feature like that is
feasible, I'm sure it will require major coding, but it may worth looking
into, if not already.
CUPS 1.5? :)
More information about the cups
mailing list