On Thu, Feb 08, 2007 at 03:24:55PM +0100, Lennart Poettering wrote: > On Thu, 08.02.07 14:04, Sjoerd Simons ([EMAIL PROTECTED]) wrote: > > On Thu, Feb 08, 2007 at 01:40:56PM +0100, Lennart Poettering wrote: > > > I'd love to see this included in avahi-glib. Though a few things like > > > domain and record browsers would still need wrapping. (and what is > > > this "freeze" thing about in the entry group stuff?) > > > > Yeah, i only wrapped what i needed in Salut. The freeze thing in the group > > entry allows you to do do various changes to the entry group and > > pushing that in one go to avahi. > > > > So for salut at some point i need to update two TXT records ``atomically'', > > thus i freeze the group, change the entries and thaw it again causing all > > the > > changes to be pushed in one go. > > Hmm, I don't think this is a good idea. Firstly, the commit() function > does something similar. (and does it the real way, i.e. it is indeed > atomic) Admittedly though, it works only once after creation of the entry > group. Secondly, Avahi accumulates multiple changes into a single > packet anyway. i.e. you have at least 50ms or so to pass your TXT > changes to Avahi and they will be sent out to the network as a single > packet.
Yeah, the freeze and thaw stuff is purely for the Second case. While it's great that avahi optimizes so changes are batched, freeze/thaw does actual give you guarantees instead of assuming that you'll be fast enough (Oh and probably saves some dbus round-trips too). But well, for my usecases i can live with potential but very rare glitches. So i don't want to argue about this too much :) > > > A while ago Davyd Madeley started a similar project which however he > > > stopped working on. Before we start merging your code into Avahi I'd > > > like to have his feedback on your work, since he is an experienced > > > GLib/Gtk hacker and obviously interested in this area. > > > > Any feedback is very much appreciated :) > > I forgot to paste the proper URLs in my original mail: > > http://davyd.livejournal.com/152749.html > http://oracle.bridgewayconsulting.com.au/~davyd/misc/main.c.html Ah this seems somewhat more high-level, while my code is really quite a thin wrapper around avahi's native API. Both have their advantages and disadvantages ofcourse. Did you contact Davyd for feedback or ... ? Sjoerd -- Death is Nature's way of recycling human beings. _______________________________________________ avahi mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/avahi
