Jamie McCracken wrote:
> On Mon, 2008-04-28 at 11:37 +0200, Philip Van Hoof wrote:
>> On Mon, 2008-04-28 at 17:05 +0800, wendy wrote:
>>> Hi Philip,
>>>
>>> I think we should take into account of using the "xesam-glib", which
>>> will simplify the implementation of "xesam-support" on tracker. 
>> Hey Wendy,
>>
>> Xesam-glib has a few classes that provide an abstract GLib GObject. You
>> can implement it and get everything DBus related for free.
>>
>> Which is nice, indeed.
>>
>> However. The DBus related things for the Xesam support for trackerd have
>> already been done in a very similar way to how xesam-glib works.
>>
>> For now ain't the code actually doing things asynchronously because none
>> of the existing trackerd infrastructure and code is prepared for
>> asynchronous operations (there's insufficient locking and data isolating
>> in place, SQLite wouldn't cope with multiple threads accessing it, etc).
> 
> sqlite 3.5 + is totally threadsafe and multiple threads can access it
> safely

That is good to know :)

> though I dont think making it  async is necessary? Surely that would
> make the code harder to read and maintain?

It isn't necessary, just like using threads isn't necessary. I thinking
using threads is much harder to read and maintain than coding
asynchronously. Understanding the execution process for a threaded
application with mutexts blocking in various places, etc is a LOT harder
to follow and understand than asynchronous programming.

> to keep the tracker daemon resposive to handling search requests we will
> need it to have threads with the main thread dedicated to handling dbus
> calls (and shutdown) only (as it is in trunk)

Making the daemon accept DBus calls asynchronously will not make it
unresponsive. In my experience, a daemon handing 2 million telephony
events a day on a busy switch can operate perfectly asynchronously, this
sort of traffic is not what I would expect on a desktop at all either. I
really have a hard time believing that the Tracker daemon would be
unresponsive if we didn't use threads. Do you have evidence of this?

> also as tracker is more increasingly used we will want multiple threads
> handling requests

Hmm? Why?

-- 
Regards,
Martyn
_______________________________________________
tracker-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/tracker-list

Reply via email to