Mark Ellis
2009-10-13 15:32:43 UTC
Hi Guys (John, copied you in in case your working on anything
significant).
I've been meaning to do a few things to sync engine, and I've finally
got around to figuring out how I want some of it to work. This is a
request for comments, ideas, help with some sticking points, and sanity
checking :)
It started with wanting to get pre WM5 devices into sync engine, at
which point I decided this would be easier if sync engine was designed
to handle multiple devices, because then you just support 2 classes of
device. Of course multiple devices would be cool anyway, so I'll do that
first.
The first bit is quite easy, move a lot of stuff from the SyncEngine
class into a new Device class, and have SyncEngine maintain a collection
of Devices. I intend to then have an 'active' device which all sync
activities act on. This is not complete multi device functionality, but
would allow multiple devices to connect without confusing sync engine,
which I believe would cause problems at the moment.
The next step I haven't completely ironed out yet, but would be
something like this.
Each Device would advertise the dbus interface on its own object path,
either using the device id or partnership id as part of the path, I'm
not sure which. The opensync sync group would then have device and
partnership info as part of its config, so it could contact the correct
dbus object. This would also tie an opensync group to a partnership,
which is definitely a good thing.
I've currently got two problems with this second part. Firstly, creating
a partnership and sync group would have to be combined for everyday
users, and I can't decide the best way to do that.
The next problem is a little more complex. To sync multiple devices
needs multiple sync groups, but we've gone a way to doing that above
with different configs. However, to enable device initiated sync, we
need to know the name of the sync group for that device to run the
correct command. I guess this could just be in the partnership specific
config, but I don't think this is well known. Maybe some kind of config
editor ?
So, what do you guys think ?
Mark
significant).
I've been meaning to do a few things to sync engine, and I've finally
got around to figuring out how I want some of it to work. This is a
request for comments, ideas, help with some sticking points, and sanity
checking :)
It started with wanting to get pre WM5 devices into sync engine, at
which point I decided this would be easier if sync engine was designed
to handle multiple devices, because then you just support 2 classes of
device. Of course multiple devices would be cool anyway, so I'll do that
first.
The first bit is quite easy, move a lot of stuff from the SyncEngine
class into a new Device class, and have SyncEngine maintain a collection
of Devices. I intend to then have an 'active' device which all sync
activities act on. This is not complete multi device functionality, but
would allow multiple devices to connect without confusing sync engine,
which I believe would cause problems at the moment.
The next step I haven't completely ironed out yet, but would be
something like this.
Each Device would advertise the dbus interface on its own object path,
either using the device id or partnership id as part of the path, I'm
not sure which. The opensync sync group would then have device and
partnership info as part of its config, so it could contact the correct
dbus object. This would also tie an opensync group to a partnership,
which is definitely a good thing.
I've currently got two problems with this second part. Firstly, creating
a partnership and sync group would have to be combined for everyday
users, and I can't decide the best way to do that.
The next problem is a little more complex. To sync multiple devices
needs multiple sync groups, but we've gone a way to doing that above
with different configs. However, to enable device initiated sync, we
need to know the name of the sync group for that device to run the
correct command. I guess this could just be in the partnership specific
config, but I don't think this is well known. Maybe some kind of config
editor ?
So, what do you guys think ?
Mark