racketmq-2017/racketmq
Tony Garnock-Jones 2a9273142a Split out relay subscriptions from remote topics.
The previous code was trying to do too much with local dataflow. This
refactoring splits (stateful) relay upstream subscriptions out into
actors of their own.

Previously, dataflow variables were used to hold a single upstream hub
and a single upstream canonical topic URL. This causes problems when
things change rapidly: an unsubscription or subscription might be in
flight, and there was no way to tell what the resulting state of the
remote topic as a whole should be if the fields had changed between
the start and finish of an in flight action.

The new design follows from the observation that an individual
subscription to an upstream hub is a stateful entity: it deserves
promotion to a full actor. There is now an actor for the remote topic,
and one for each established upstream subscription. Upstream
subscriptions are created in response to demand expressed by the
remote topic actor; to switch, all it needs to do is update its
demand, and new subscriptions will spring into being while surplus
subscriptions gracefully terminate.

Also, this commit fixes a bug where upstream subscriptions were being
made to the requested-topic rather than to the upstream-topic.
Consequently, self-subscriptions (with multiple `http-listener`
aliases) work now without infinite mail loops.

There is still an issue that blocking actions in on-stop clauses don't
run to completion; that is being dealt with separately, as part of a
reexamination of facet-terminating events more generally.
2016-11-22 15:16:35 +13:00
..
htdocs Simple websocket client 2016-11-21 17:05:43 +13:00
hub Split out relay subscriptions from remote topics. 2016-11-22 15:16:35 +13:00
log Daemontools infrastructure 2016-11-20 16:48:05 +13:00
private Reinterpret canonical-local-host -> canonical-baseurl. 2016-11-22 11:35:39 +13:00
templates Templates 2016-11-21 09:09:05 +13:00
config.rkt Warn when config file is missing 2016-11-21 10:54:07 +13:00
defaults.rktd Reinterpret canonical-local-host -> canonical-baseurl. 2016-11-22 11:35:39 +13:00
hub.rkt Reinterpret canonical-local-host -> canonical-baseurl. 2016-11-22 11:35:39 +13:00
info.rkt info.rkt updates, including racketmq launcher 2016-11-21 11:52:28 +13:00
poke.rkt Distinct subscribers in poke.rkt 2016-11-22 13:32:08 +13:00
protocol.rkt Reinterpret canonical-local-host -> canonical-baseurl. 2016-11-22 11:35:39 +13:00
run Command-line argument -c --> -f 2016-11-21 17:04:44 +13:00
template.rkt Templates 2016-11-21 09:09:05 +13:00