Picolab / Picolab/pico-engine

How to deal with collisions among rulesets?

Open
#613 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
TypeScript
Stars
51
Forks
10
Avg merge
4m
Merged PRs (30d)
1

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked Grammar, Event Loop Introduction, and Multiple rulesets to layer functionality pages, then examine how the engine handles ruleset identifiers, channel tags, and event domains. Done means agreeing on a collision policy and recording clear scope and acceptance criteria for any follow-up implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.