Limitations in IDL files
dbus at matthew.ath.cx
Wed Mar 21 04:48:32 PDT 2007
On Wed, Mar 21, 2007 at 12:38:03PM +0100, jacques GUILLOU wrote:
> Hi Matthew,
> Thank you for your answer.
> I am investigating on DBus because I think it's a good candidate as an IPC
> framework for the linux based automotive platform we are trying to define in
> my company.
> This platform will probably be made of many components (running in their own
> process) which will have to communicate with each other using this IPC
This sounds like a sensible thing to use D-Bus for.
> Let's take the example of a service which exposes this method in version 1 :
> void play(string arg1, int arg2);
> If, for some reason, a new parameter is needed for this method in version 2,
> the client code has to be modified to work with the new signature:
> void play(string arg1, int arg2, int arg3);
> That's not flexible enough according to me, because the client code has to
> be modified everytime something has changed with the method (even if arg3 is
> just an optional field). It would be better if we could define a structure
> which contains the parameters of the method:
The client code still needs to be modified, in as many places when you
change the struct though. You don't have to change the actual call or
the stubs, but you do have to change the struct definition and all the
places where the args are assigned or read.
If you are changing API/ABI then all the clients will have to be changed
to some extent, regardless of how you do it.
What you can do (and D-Bus allows) is to only change your API by adding
methods. Thus, you still respond as before to the old, two-argument,
method, but you also respond to the method with 3 arguments. Old clients
will call the old method and clients which have been updated will call
the new method.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20070321/efc814bf/attachment.pgp
More information about the dbus