Redefine channel source to be based off of publisher ID, use source in publishing
5 unresolved threads
Define source across the client and server consistently by tying it ultimately to publisher groups, more akin to how sources are used within data meshes. These can essentially map one-to-one with the publisher ID (also referred to the producer ID in the client code). Every change here essentially follows from this, including:
- Redefining the channel source to be based off of the publisher ID, and removing the source/identifier distinction. Now, we just pass in the channel name and don't need a class method to create the Channel class.
- Add source kwarg to find/count which is ultimately used in the initial publisher registration call. Since these are tied to the channels being published, this ends up being a way of checking at registration which channel metadata for a source is already stored server-side, and is used to compare with what will be published in subsequent publish calls.
- Allow either a single source or multiple sources to be passed into find/count. The type signature for data_type was also expanded for consistency.
- Remove an unused method in the publisher for publisher metadata.
Merge request reports
Activity
mentioned in merge request arrakis-server!42 (merged)
99 100 ---------- 100 101 pattern : str, optional 101 102 Channel pattern to match channels with, using regular expressions. 102 data_type : list[numpy.dtype], optional 103 Data types to match. 103 data_type : numpy.dtype | list[numpy.dtype], optional 104 If set, find all channels with these data types. 104 105 min_rate : int, optional 105 106 Minimum sampling rate for channels. 106 107 max_rate : int, optional 107 108 Maximum sampling rate for channels. 109 source : str | list[str], optional 110 If set, find all channels associated with these sources. 127 131 ---------- 128 132 pattern : str, optional 129 133 Channel pattern to match channels with, using regular expressions. 130 data_type : list[numpy.dtype], optional 131 Data types to match. 134 data_type : numpy.dtype | list[numpy.dtype], optional 135 If set, find all channels with these data types. 20 20 class Channel: 21 21 """Metadata associated with a channel. 22 22 23 Channels are of the form: 24 <source>:<identifier> 25 26 23 Parameters 27 24 ---------- 28 source : str 29 The source associated with this channel. 30 identifier : str 31 The identifier associated with this channel. 25 name : str 26 The name associated with this channel. 163 164 ---------- 164 165 pattern : str, optional 165 166 Channel pattern to match channels with, using regular expressions. 166 data_type : list[numpy.dtype], optional 167 Data types to match. 167 data_type : numpy.dtype | list[numpy.dtype], optional 168 If set, find all channels with these data types. 168 169 min_rate : int, optional 169 170 Minimum sampling rate for channels. 170 171 max_rate : int, optional 171 172 Maximum sampling rate for channels. 173 source : str | list[str], optional 174 If set, find all channels associated with these sources. 25 26 23 Parameters 27 24 ---------- 28 source : str 29 The source associated with this channel. 30 identifier : str 31 The identifier associated with this channel. 25 name : str 26 The name associated with this channel. 32 27 data_type : numpy.dtype 33 28 The data type associated with this channel. 34 29 sample_rate : float 35 30 The sampling rate associated with this channel. 36 31 time : int, optional 37 32 The timestamp when this metadata became active. 33 source : str mentioned in commit 2c71c83d
Please register or sign in to reply