Open griffinmilsap opened 1 year ago
@pperanich and @hannahgooden; I'd appreciate your thoughts on this when you get a chance.
lol oops -- reopening
Another possibility I'm entertaining is that Collections
can have InputTopic
s and OutputTopic
s in addition to InputStream
s and OutputStream
s. If Stream
s are defined, there's a republisher associated with them (and associated functionality throughout), but the current behavior is maintained if there's only a Topic
defined. Topic
s would have no arguments and just act as topics in the graph, with zero performance impact for composition.
Now that we have a 1:1 correspondence between
Publisher
s andOutputStream
s inUnits
, and the ability to setPublisher
specifics from theOutputStream
initializer, it is now a little unintuitive and surprising thatOutputStream
s inCollections
do not actually result in the creation of aPublisher
that we could subscribe to from another process. In particular, if a user has anOutputStream
as part of aCollection
that they want to expose on a public port (e.g. by defining thehost
orport
keyword arguments for the collectionOutputStream
) -- currently, noPublisher
will be created which is confusing behavior at best (and maybe a bug at worst). The only timePublisher
s andSubscriber
s are created are when there is anOutputStream
orInputStream
defined as part of aUnit
.Adding a "Republisher"
Unit
at the collection level for each collectionOutputStream
could alleviate this confusing behavior, but at the expense of occupying more sockets and performance degradation. ARepublisher
decorator or hint of some sort might allow a user to explicitly define when anOutputStream
is republishing a topic could be a beneficial feature addition, as well as a warning when it appears that a user is attempting to interact directly withCollection
levelStream
s. Currently, this is a bigger issue withOutputStreams
becauseSubscriber
objects have no configurable keyword arguments, but that's subject to change (future stream type enforcement/message filtering?) so it may be that republishers are required for all collection streams (performance regressions be damned).