Summary: | [RFC] DBus Spec: Activate all the owners of a single name | ||
---|---|---|---|
Product: | dbus | Reporter: | Chengwei Yang <chengwei.yang.cn> |
Component: | core | Assignee: | Havoc Pennington <hp> |
Status: | RESOLVED WONTFIX | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | chengwei.yang.cn |
Version: | 1.5 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Chengwei Yang
2013-07-02 07:34:40 UTC
Currently, activation entries hash table has bus name as key and activation entry as value. For the minimal change, just change the value to a DBusList of activation entry is fine to me. Something like watch hash table in mainloop. Meanwhile, a corresponding change to launchhelper is necessary. So it can activate all the owners of that name. I have plan to implement this feature, need any positive comment or negative one? (In reply to comment #0) > Say there are N .service file declare that they own a > name, if none of them is running when a request coming, we should > activate them all > * in random order? > * in defined order? How? Can be defined by user? Why is this better than only activating one? Which concrete services/situations would benefit from this feature? (In reply to comment #2) > (In reply to comment #0) > > Say there are N .service file declare that they own a > > name, if none of them is running when a request coming, we should > > activate them all > > * in random order? > > * in defined order? How? Can be defined by user? > > Why is this better than only activating one? > > Which concrete services/situations would benefit from this feature? First, this is trying to address the FIXME in DBus Spec [FIXME what happens if two .service files offer the same service; what kind of error is reported, should we have a way for the client to choose one?] In the current implementation, only the first .service found by readdir(3) could be loaded, and readdir(3) returns dirent without any order, so it's unpredicatable which .service will win. Given that dbus support multiple owner of name perfectly with owner queue, so all the service providers should have learned how to handle failure to own its name, so I think activate all of them looks reasonable. (In reply to comment #3) > [FIXME what happens if two .service files offer the same service; what kind > of error is reported, should we have a way for the client to choose one?] > > In the current implementation, only the first .service found by readdir(3) > could be loaded, and readdir(3) returns dirent without any order, so it's > unpredicatable which .service will win. > > Given that dbus support multiple owner of name perfectly with owner queue, > so all the service providers should have learned how to handle failure to > own its name, so I think activate all of them looks reasonable. No, I'm really not convinced by this. You have replaced "an arbitrarily-chosen service gets the name" with "an arbitrarily-chosen service gets the name, less efficiently". Changing this would require there to be some advantage to the change. I'm not seeing one. I don't think this is useful. If you do, please reopen and justify why. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.