pico-engine
pico-engine copied to clipboard
Let rulesets store information in established subscriptions
Proposing a rule that selects on a wrangler:new_key_value_pair
event, with attributes: Id
the established subscription identifier, key
a key not reserved* for subscriptions, and value
an optional value (a falsy value to mean remove the key).
The rule to raise a wrangler:key_value_updated
event upon successful addition/deletion to/from the established subscription, with the original attributes.
The key-value pair is for the use of the pico that sets it.
For keys that begin either "Rx_" or "Tx_", it is considered good relationship practice to also send a similar event over the subscription to the other side, with the key prefix reversed. Care must be taken to avoid initiating an infinite loop.
*Reserved subscription keys are:
["Id","Rx_role","Tx_role","Rx","Tx","Tx_host"]