-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardize facelift dbus communication #303
base: master
Are you sure you want to change the base?
Standardize facelift dbus communication #303
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We went away from using the "native" DBus serialization a while ago, for 2 reasons:
- Performance
- We have reached the maximum number of arguments which can be written in a message.
AFAIU, your commit reverts that change, which is a bad idea.
|
862cf2f
to
fa75246
Compare
I could only find the following limitations:
|
as noticed this was most probably due to incorrect serialization of lists of structures, so if done properly it should not be the case |
Only the serialization part of DBus is not used in a classical manner. We need an IPC to deliver our messages, which is where DBus useful for us.
Feel free to write a benchmark if you really need that in order to be convinced.
flatbuffers is a serialization library, it provides no IPC. |
|
The problem is that Qt is missing an API which would be needed to serialize structures "properly". I have spent a lot of time trying to find an acceptable workaround. Maybe that API is available in a more recent version of Qt though. |
a344cd6
to
34c3cad
Compare
Change-Id: Ifd09ce0e4b16a6a060d2a2634adc614f56b3a139
6680a1e
to
47b4a42
Compare
Fix service type
IDK about the time of facelift initial implementation but as Qt5.12 the API covers all requirements. |
What kind of data did you use in your benchmark ? The overhead introduced by the serialisation is not significant if only a small amount of data is being transferred, so please adjust your benchmark to include large data such as long lists. Also, the registration of all those types in QDBus type system probably has a signification performance cost at startup. If you resolve the merge conflict, we can see if some tests fail, but keep in mind that our test coverage is still incomplete. |
We are doing further benchmarking and will include the QDbus type registerations as well. |
update the fork
1ae29f1
to
47b4a42
Compare
All of them are addressed. |
Rejecting is not addressing. |
Either you are having a dialogue about the review points which involves you delivering arguments against the latest comments otherwise they are consider resolved. Or you consider this a one-way street PR which is not a open source culture and there is no point for either of us continue on this. |
164a6b9
to
1574966
Compare
1574966
to
10557c3
Compare
use QLatin1String more often
Mistakenly commited This reverts commit 3ed6fe9.
changedProperties -> dirtyProperties more specialized DBus and Local IPC proxy methods
dd81f12
to
8e122fb
Compare
Please remove "request a change", no points are open. |
You mentioned a noticeable drop in performance. Could you please provide some details ? Most people simply do not care about having a "native" DBus serialization but they do care about having an IPC layer which performs well with their use cases. I do not think it is reasonable to ask anyone to work around a performance drop introduced by a feature which they do not need. |
I took a very extreme example where a IPC interface has methods with structs over hundreds of fields, making RPC calls hundreds of times in a row, to see how libdbus acts. So "Nobody" won't feel any difference! We have a huge project with all possible use-cases and observed no difference. Anyhow if for any reason such unrealistic use-case (hunders of fields in struct) is needed, "toByteArrayOverDBus" annotation for structs will relieve one from signature validation in libdbus and remove any possible overhead. The annotation should be on struct level as they could cause overhead with their size not the interface. |
Unless this has changed recently, your project is mostly single-process, so I understand that the difference can hardly be noticed... There was a noticeable performance improvement when switching to the QByteArray serialization when multi-process was used.
Lists of reasonably large structs should be supported with reasonable performance. That kind of list can easily contain up to hundred fields.
Either an interface requires the interoperability feature and it needs to be carefully designed to perform well over IPC, or it does not use need interoperability (which is probably the most common situation) and it should benefit from an optimal serialization performance and not have any limitation in terms of signature length. The decision is based on how the interface is used, so I strongly believe that the annotation should belong to the interface definition. |
Obviously the Multi-process part is in focus. My benchmarks don't show any measurable performance change in realistic cases, we are talking about less than fractions of ms per calls.
Lists/Maps doesn't increase the libdbus overhead, signature is increased only by "a()".
It is not a feature to be conformant with the DBus rules, it is a bug not to be.
No it is not how it works, the limit is per method argument not the accumulation of them.
|
…Pelagicore-master-1
merge master peligicore
662dfb0
to
adcce61
Compare
[WIP] Standardize facelift dbus communication
Change-Id: Ifd09ce0e4b16a6a060d2a2634adc614f56b3a139