[interfacekit] Re: BMimeType discoveries
- From: Tyler Dauwalder <tyler@xxxxxxxxxxxxx>
- To: interfacekit@xxxxxxxxxxxxx
- Date: Mon, 10 Jun 2002 23:48:22 +0000
> * The Get*() methods directly access the MIME database.
>
> * The Set*() methods send a message to another entity which does the job.
> The function that does the sending is called _send_to_roster_(), so I
> suppose the roster is the one. Since the registrar has a thread named
> _roster_thread_, I assume the roster lives in the registrar.
>
> * Start/StopWatching() call BRoster::_Start/_StopWatching().
>
> * Adding/removing a MIME type file in ~/config/settings/beos_mime/*/ does
> not trigger a notification message. So obviously no node monitoring is
> done and changes to the database are supposed to be done using the API.
All very interesting :-)
> This leads to the question, what we want to implement similarly and what
> differently.
> I wouldn't like to implement the actual Get*() and Set*() functionality in
> different places, though it might make sense for performance reasons. I
> suppose most of the database accesses are read only, and the overhead of
> additionally sending a message forth and back might be considerable big.
> On the other hand there are certainly only a few MIME types that are
> usually used, so caching implemented in the registrar would mostly avoid
> file accesses.
I too like the idea of having all the Get*() and Set*() functionality
implemented in one place, along with a cache in the registrar. I'm not the
most educated on the topic, but messages are fairly cheap, aren't they?
Seems to me we could do it that way (unify Get*() and Set*() in the
registrar), and if we weren't happy with it, move the code for the Get*()
functions into BMimeType and scrap the cache in the registrar. In fact, we
might as well just do the registrar uncached to begin with, and add caching
later if we decide to stick with the unified route.
As to monitoring, that would continue to be dependent upon access through
the registrar, due caching (i.e. modifying the database manually would not
trigger updates). That seems reasonable to me, as I can't think off hand of
any good justification for not going through BMimeType.
What'd'ya think?
-Tyler
- Follow-Ups:
- [interfacekit] Re: BMimeType discoveries
- From: Cedric Degea
- References:
- [interfacekit] [openbeosstorage] BMimeType discoveries
- From: Ingo Weinhold
Other related posts:
- » [interfacekit] Re: BMimeType discoveries
- » [interfacekit] Re: BMimeType discoveries
- » [interfacekit] Re: BMimeType discoveries
- [interfacekit] Re: BMimeType discoveries
- From: Cedric Degea
- [interfacekit] [openbeosstorage] BMimeType discoveries
- From: Ingo Weinhold