Re: [hybi] Subscription/topic confusion

Tobias Oberstein <tobias.oberstein@tavendo.de> Tue, 27 October 2015 22:09 UTC

Return-Path: <tobias.oberstein@tavendo.de>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 739E61A1B22 for <hybi@ietfa.amsl.com>; Tue, 27 Oct 2015 15:09:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.1
X-Spam-Level:
X-Spam-Status: No, score=0.1 tagged_above=-999 required=5 tests=[BAYES_50=0.8, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lf5hexmvSPs6 for <hybi@ietfa.amsl.com>; Tue, 27 Oct 2015 15:09:53 -0700 (PDT)
Received: from EXHUB020-3.exch020.serverdata.net (exhub020-3.exch020.serverdata.net [206.225.164.30]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 09AD21A1B03 for <hybi@ietf.org>; Tue, 27 Oct 2015 15:09:53 -0700 (PDT)
Received: from [172.16.14.162] (62.214.69.218) by smtpx20.serverdata.net (206.225.164.35) with Microsoft SMTP Server (TLS) id 8.3.377.0; Tue, 27 Oct 2015 15:09:51 -0700
To: Michal Fojtak <fojtak.michal@gmail.com>, "hybi@ietf.org" <hybi@ietf.org>
References: <CAHo5QGKkd2PGruw0VaRh_gd7M5o7FdDbLrcfnEQTNbYy3fAQQg@mail.gmail.com>
From: Tobias Oberstein <tobias.oberstein@tavendo.de>
Message-ID: <562FF629.7060705@tavendo.de>
Date: Tue, 27 Oct 2015 23:09:45 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version: 1.0
In-Reply-To: <CAHo5QGKkd2PGruw0VaRh_gd7M5o7FdDbLrcfnEQTNbYy3fAQQg@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"; format=flowed
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/hybi/9e1F4EXul7st-v_ymt69r5DWV4g>
Subject: Re: [hybi] Subscription/topic confusion
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/hybi/>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 27 Oct 2015 22:09:54 -0000

Am 20.10.2015 um 17:43 schrieb Michal Fojtak:
> WAMP protocol defines two main mechanisms - RPC via registrations and
> calls, event distribution via subscribe/publish.
>
> Callee can register procedure and such a procedure becomes an object
> which is tracked internally by router. Router "is aware" of
> registrations. Caller can query registrations via meta API.
>
> HOWEVER
> This is not a story of other wamp entity - the topic. Topic as such is
> not stored anyware in the router. Router is not aware of them. Potential
> subscriber cannot query available topics. Ironically, you can query
> subscriptions. But unless somebody subscribes to it, the topic object
> exists only in publisher.
> It kind of contradicts the main advantage of having a central hub -
> router which is aware of all objects - procedures and topics.

The analogy is as follows:

callee registers a procedure at a router, which results in a "registration"

subscriber subscribes to a topic at a router, which results in a 
"subscription"

both registrations and subscriptions can be listed via the WAMP meta API

neither callers nor publishers are tracked at the router until there is 
an actual call from a caller, or an event published by a publisher.

neither callers nor publishers can be listed

>
> Would it be possible to "register" topics like we can register procedures?
> We can then get a list of topics. We can define and describe them. And
> other useful things.
>
> P.S.: The subscription id is quite confusing as well. It is not really
> subscription identification. Router creates this id when a first

Yes, it is. Please see below ..

> subscriber subscribes to the topic. If there was a topic then we would
> have topic id and many subscriber ids for each individual subscriber
> which models the situation more naturally.

The subscription ID identifies the subscription that is managed by the 
broker.

The topic being subscribed to is only _one_ part of a subscription. E.g. 
the matching strategy (eg exact-match vs prefix-match) is also part of 
the subscription.

There can be 2 subscriptions with the _same_ topic, but different 
matching policies.

In fact, separating "subscription" from "topic" was a major change we 
did when moving from WAMP v1 to v2.

/Tobias