Skip to content

Experimental branch on aggregation operators for spaces #7

@ghost

Description

The branch aggregation contains a new interface and new operators for aggregation:

  • t, _ := s.PutAgg(f, x...): Put a tuple to space s obtained by using a user defined aggregation function f on the tuples matched by a template x.... If no tuples are matched, the template x... is converted to its intrinsic tuple, that is, the concrete values read from the template itself, and put in s instead.
  • t, _ := s.GetAgg(f, x...): Get a tuple from space s obtained by using a user defined aggregation function f on the tuples matched by a template x..., while removing the tuples in the process.
  • t, _ := s.QueryAgg(f, x...): Query for a tuple from space s obtained by using a user defined aggregation function f on the tuples matched by a template x..., leaving space s intact.

All operators are non-blocking and return a copy of aggregate tuple t. The returned copy can be ignored.

Below is a visualisation of the three operators PutAgg(), GetAgg() and QueryAgg(). t corresponds to a tuple returned, while template T = x.... The empty tuple is (), and small crosses, circles and squares indicate tuples of possibly different type.

aggregation

The interface referred to here will be referred to as the Star Library.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions