Page MenuHomePhorge

Subscriptions engine
Needs ReviewPublic

Authored by machniak on Mon, Apr 15, 11:41 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 28, 6:09 PM
Unknown Object (File)
Sat, Apr 27, 1:46 PM
Unknown Object (File)
Fri, Apr 26, 7:04 PM
Unknown Object (File)
Fri, Apr 26, 8:09 AM
Unknown Object (File)
Fri, Apr 26, 6:35 AM
Unknown Object (File)
Thu, Apr 25, 7:35 AM
Unknown Object (File)
Wed, Apr 24, 11:31 PM
Unknown Object (File)
Wed, Apr 24, 3:27 PM

Details

Reviewers
None
Group Reviewers
Syncroton Developers
Summary

Store subscriptions in SQL database - to support subscribing to DAV folders

Diff Detail

Repository
rS syncroton
Branch
dev/kolab-subscriptions
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 47100
Build 17955: arc lint + arc unit

Event Timeline

machniak created this revision.
  • Merge branch 'master' into dev/kolab-subscriptions

For existing installations that do not use a DAV backend; I suppose we'll just loose the subscription state, but it should otherwise work? And we'll loose the integration between imap subscription state and the syncroton subscription state, correct?

lib/kolab_sync_storage.php
1887

This used to operate on cached data, but now we seem to be executing a sql query everything to list the subscriptions, which might actually matter for this function (we'll end up doing the lookup once per folder). Maybe we should just populate the cache for all folders in one go?

tests/SyncTestCase.php
75

delete then?

  • Add 2nd arg to folder_subscriptions() calls

I agree that the way we do id2name and vice versa sucks. Passing type (model name) everywhere is not great. I think in future we could improve that (e.g. by using IDs in form of "<type-class>:<id>", but it would be a BC break requiring a full re-sync.

I'm also thinking about using Cyrus v3 MAILBOXID (RFC 8474) for IMAP folders (for DAV the URI is fine, imo). Unfortunately Dovecot does not support that, and I'm not sure if falling back to using IMAP annotations (and setting them with generated uuid) would be a step in the right direction.

lib/kolab_sync_storage.php
1887

It shouldn't be a big problem. We're doing a query per folder type class, not per folder. $this->folder_uids is being populated with all subscribed folders of a specified class.

tests/SyncTestCase.php
75

That was a tricky part to figure out before, so I'll leave it in case we need to use IMAP in future here.