Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to deal with collisions among rulesets? #613

Open
b1conrad opened this issue Jul 9, 2022 · 0 comments
Open

How to deal with collisions among rulesets? #613

b1conrad opened this issue Jul 9, 2022 · 0 comments
Labels

Comments

@b1conrad
Copy link
Member

b1conrad commented Jul 9, 2022

There are some dimensions of potential collision, as we have picos with more and more rulesets (I'm looking at you, pico with 28 rulesets and 62 channels).

  1. RIDs. I pico can have only one ruleset with a given identifier, and this is mostly dealt with by a naming convention like that of Java classes, using a controlled domain name in reverse order followed by an identifier meaningful to the purpose of a ruleset. This "convention makes globally unique RID choice easier." (quoted from Grammar, section Ruleset identifier (RID)).
  2. Channel tags. Any ruleset can create channels within a pico. Each channel is identified internally with a globally unique identifier assigned by the pico engine. However, in practice it is identified by its "tags" which are assigned by the programmer who writes the ruleset. Collisions here could be troublesome (any ruleset can delete any channel of the pico). A possible enhancement might be to include the RID of the creating ruleset as an attribute of each channel; that data point could allow disambiguation, and prevent removal if the RIDs don't match.
  3. Event domains. When an event comes in on one of the pico's channels, all rulesets are consulted to see if they have rules that need to react to the event (see Event Loop Introduction for more details). This makes it possible for one ruleset to "eavesdrop" on events that other rulesets use. This can be very useful (see Multiple rulesets to layer functionality for more details), but can also cause problems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant