[hybi] Subscription/topic confusion

Michal Fojtak <fojtak.michal@gmail.com> Tue, 20 October 2015 15:43 UTC

Return-Path: <fojtak.michal@gmail.com>
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 AE80E1A9302 for <hybi@ietfa.amsl.com>; Tue, 20 Oct 2015 08:43:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] 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 bvC0487YpPSC for <hybi@ietfa.amsl.com>; Tue, 20 Oct 2015 08:43:45 -0700 (PDT)
Received: from mail-ob0-x244.google.com (mail-ob0-x244.google.com [IPv6:2607:f8b0:4003:c01::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1347B1A9108 for <hybi@ietf.org>; Tue, 20 Oct 2015 08:43:45 -0700 (PDT)
Received: by obct4 with SMTP id t4so1494544obc.2 for <hybi@ietf.org>; Tue, 20 Oct 2015 08:43:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=SLBJbp6wwCOGIMGfuj8bMcEWLLnk53Aba+YsvaO+LJo=; b=qv4RL7/9JzYLg1r6KDyuseyTc4c9ypOLfEZ5gl5s5KN15SzTI6kCP+zpUeBEO8WV5N OTPeqWgc9bSSJuThhh9FLxh9rgCkoSl46fUyrrk7MMKAI8bv/uIA0PCTJpFS/ommbnTw 2ELfIvhtnGSUJKE7fPemnbSJD+7LKTODdAovvEuH4kCY+TX0CLMtMFNsTcVwSO4I6H87 BUSZpUz8O6yNK42jZUGKN6UbmhQElwnLcU9o66Wt+lnQfG7wSLWqVinkvIH9dEAKhiW6 T4UwSXSxX9fLfnCsQ94+7ZEiygqNBV4zqda9uq0ROpvmar6tI4E3E/gsIHdvZoMTpyok BGKg==
MIME-Version: 1.0
X-Received: by 10.182.66.8 with SMTP id b8mr2458113obt.53.1445355824474; Tue, 20 Oct 2015 08:43:44 -0700 (PDT)
Received: by 10.202.49.16 with HTTP; Tue, 20 Oct 2015 08:43:44 -0700 (PDT)
Date: Tue, 20 Oct 2015 17:43:44 +0200
Message-ID: <CAHo5QGKkd2PGruw0VaRh_gd7M5o7FdDbLrcfnEQTNbYy3fAQQg@mail.gmail.com>
From: Michal Fojtak <fojtak.michal@gmail.com>
To: hybi@ietf.org
Content-Type: multipart/alternative; boundary=e89a8f923faa7df0a705228b2086
Archived-At: <http://mailarchive.ietf.org/arch/msg/hybi/SeUo7FuUBDJNBN9JjXI8YiHhpiM>
Subject: [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, 20 Oct 2015 15:47:36 -0000

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.

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 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.