{"action":"created","issue":{"url":"https://api.github.com/repos/fanout/pushpin/issues/47635","repository_url":"https://api.github.com/repos/fanout/pushpin","labels_url":"https://api.github.com/repos/fanout/pushpin/issues/47635/labels{/name}","comments_url":"https://api.github.com/repos/fanout/pushpin/issues/47635/comments","events_url":"https://api.github.com/repos/fanout/pushpin/issues/47635/events","html_url":"https://github.com/fanout/pushpin/issues/47635","id":181919110,"number":47635,"title":"wildcard subscriptions","user":{"login":"jkarneges","id":521953,"avatar_url":"https://avatars.githubusercontent.com/u/521953?v=3","gravatar_id":"","url":"https://api.github.com/users/jkarneges","html_url":"https://github.com/jkarneges","followers_url":"https://api.github.com/users/jkarneges/followers","following_url":"https://api.github.com/users/jkarneges/following{/other_user}","gists_url":"https://api.github.com/users/jkarneges/gists{/gist_id}","starred_url":"https://api.github.com/users/jkarneges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkarneges/subscriptions","organizations_url":"https://api.github.com/users/jkarneges/orgs","repos_url":"https://api.github.com/users/jkarneges/repos","events_url":"https://api.github.com/users/jkarneges/events{/privacy}","received_events_url":"https://api.github.com/users/jkarneges/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-09T23:23:55Z","updated_at":"2016-11-15T23:55:15Z","closed_at":null,"body":"It would be useful to subscribe to channels by wildcard. For example, a publisher could publish a message to channel `A.B.C`, and a receiver with subscription to `A.*` could receive the message.\n\nWildcard subscriptions are not uncommon in publish-subscribe systems, however they tend to work differently in each system. For example, ZeroMQ supports filtering by prefix. Bayeux supports segmented channels and trailing wildcards of either single segment or multi-segment (e.g. `/a/*` matches `/a/b`, and `/a/**` matches `/a/b/c/d`). At least in these two cases, wildcarding is effectively suffix only, which is pretty conservative and seems like something we could reasonably do in Pushpin.\n\nProposal:\n- If a subscribed channel ends with a single asterisk, then it should count as a wildcard. For example: `Grip-Channel: foo.*`.\n- Pushpin should subscribe to the channel without the asterisk on its ZeroMQ SUB socket. A subscription to `foo.*` would use `foo.` as the SUB socket filter.\n\nNote that ZeroMQ being limited to filtering by prefix doesn't necessarily mean that we can't support more complex wildcarding. For example, a mid-string wildcard like `foo*bar` could be supported by setting the SUB socket to use `foo` as the filter, but then only deliver to clients if the full expression matches. However we should only implement something like this if there is a real need. For most applications needing wildcards, suffix-only is usually enough.\n"},"comment":{"url":"https://api.github.com/repos/fanout/pushpin/issues/comments/260809243","html_url":"https://github.com/fanout/pushpin/issues/47635#issuecomment-260809243","issue_url":"https://api.github.com/repos/fanout/pushpin/issues/47635","id":260809243,"user":{"login":"jkarneges","id":521953,"avatar_url":"https://avatars.githubusercontent.com/u/521953?v=3","gravatar_id":"","url":"https://api.github.com/users/jkarneges","html_url":"https://github.com/jkarneges","followers_url":"https://api.github.com/users/jkarneges/followers","following_url":"https://api.github.com/users/jkarneges/following{/other_user}","gists_url":"https://api.github.com/users/jkarneges/gists{/gist_id}","starred_url":"https://api.github.com/users/jkarneges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkarneges/subscriptions","organizations_url":"https://api.github.com/users/jkarneges/orgs","repos_url":"https://api.github.com/users/jkarneges/repos","events_url":"https://api.github.com/users/jkarneges/events{/privacy}","received_events_url":"https://api.github.com/users/jkarneges/received_events","type":"User","site_admin":false},"created_at":"2016-11-15T23:55:15Z","updated_at":"2016-11-15T23:55:15Z","body":"Some more notes:\r\n\r\n* Stats subscription events should advertise the channel with the asterisk.\r\n* `Grip-Last` request headers should include the channel with the asterisk (origin will be responsible for doing whatever is right).\r\n* `prev-id` checking per connection needed for reliability may not make sense with wildcard subscriptions?"}}
{"actor":{"display_login":"jkarneges"}}