Open jkarneges opened 8 years ago
Some more notes:
Grip-Last
request headers should include the channel with the asterisk (origin will be responsible for doing whatever is right).prev-id
checking per connection needed for reliability may not make sense with wildcard subscriptions?
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 toA.*
could receive the message.Wildcard 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.Proposal:
Grip-Channel: foo.*
.foo.*
would usefoo.
as the SUB socket filter.Note 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 usefoo
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.