DCOP broadcasting
Andras Mantia
amantia at kde.org
Mon Oct 13 17:00:57 BST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday 13 October 2003 18:50, Waldo Bastian wrote:
> DCOP supports broadcasts but it doesn't support replies to broadcasts. You
may
> wish to use "dcopFind" which makes calls to different clients/objects till
it
> finds one that replies with a positive acknowledgement. That's useful if you
> try to solve "find if any instance has file foobar open".
>
> As far as sessions go. The DCOP address space is limited to a single
session.
> There is some support for multiple sessions hacked into the dcop command
line
> tool.
>
> If you want to prevent concurrent access to files you should be using a
file-
> locking mechanism and not DCOP. See e.g. http://www.cs.helsinki.fi/linux/
> linux-kernel/2001-41/0633.html
>
Thanks for the answer. Actually what we are trying to solve is the crash
recovery in Quanta. Quanta creates from time to time a backup file for every
opened and modified file. If for some reason Quanta or the system crashes
these files may have your latest unsaved content. The problem arises when
multiple instances of Quanta are running and the same file was opened in more
than one instance. If one instance has crashed and a new one is started we
should find out somehow if the created backups belong to a running instance
(in which case we don't care about them) or not (in which case it means that
the instance which created has crashed and the backup needs to be used). My
original idea was to add the PID to each backup file name and just check if
there is a quanta process with that PID running or not. But a DCOP solution
might be more elegant and this is why I was asking this. Maybe we really need
to go the PID way, as that works in more cases (also when using multiple
sessions) or I will look at the file locking, if the file gets unlocked when
the locking application crashes or not.
BTW, a similar crash recovery might be useful in many applications, like in
the whole KOffice. Is there something similar implemented?
Andras
- --
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
iD8DBQE/isw5TQdfac6L/08RAhPFAKDdNGfqzUwTj7/LK1LBw2CglJCO5ACdHEO2
Uu9XwZBvHQaD2juYDSqhtZY=
=o2xu
-----END PGP SIGNATURE-----
More information about the kde-core-devel
mailing list