On 08.09.2011 08:02, Alexander Holler wrote: > On 07.09.2011 22:25, Ralph Meijer wrote: >> On Wed, 2011-09-07 at 22:05 +0200, Alexander Holler wrote: >>> Hello, >>> >>> I think it should be defined what happens with subscriptions when >>> ownership is granted or removed (through 8.9.2 Modify Affiliation). >>> >>> I suggest the following changes: >>> >>> - Ownership is granted. >>> All subscriptions which are not for the bare JID (that means with >>> resource) will be removed. >>> A subscription for the bare JID is added (if not already existent). >>> >>> - Ownership is removed. >>> The subscripton for the bare JID is removed, which means the affected >>> entity won't have a subscription afterwards. >> >> Hi! >> >> Why would you want this? >> >> Subscriptions and affiliations are intentionally orthogonal. One of the >> key aspects of the observer pattern, which is the basis of our pubsub >> protocol, is that there is a separation of concerns between publishers >> and subscribers. Publishers may only ever want to push stuff out and >> never subscribe, subscribers may never push. Some entities might do >> both. We also added the concept of 'owners'. Owners of nodes don't >> necessarily need (or want) to subscribe to their nodes. >> >> I certainly wouldn't want to have such side effects in my currently >> deployed pubsub applications. > > Owners are subscribed as requirement and by default, so you have to > define what happens with subscribtions when ownership is granted or > removed. Currently the behaviour is undefined.
During a quick search I haven't found were it's stated that owners are subscribed by default, but publisher is defined as ----- Publisher An entity that is allowed to publish items to a node and that is automatically subscribed to the node. ----- So here we have the same problem. If you change affiliation you have to subscribe the entity. And if an entity is automatically subscribed, it should be defined if it will be automatically be unsubscribed too (or not). Then we have the problem with resources. If multiple subscriptions are not supported, will a bare JID and a full JID (with the same bare JID) be handled like one or like two? That means does a subscription request of the bare JID fail with "pending-subscription" when a full JID (same bare JID) is already subscribed? (and vice versa) If so, you have to handle automatic additions of subscribtions to a bare JID as I've written above, otherwise you might end with an inconsistency (bare and full JID subscribed). Regards, Alexander
