Kaa releases
Shortcuts
Skip to end of metadata
Go to start of metadata

Kaa provides a mechanism for aggregating endpoints within an application that is based on groups. A group represents an independent management entity of an arbitrary granularity (depending on the profile filters associated with the group). The endpoint groups membership is evaluated for every endpoint registered in the system based on the associated profile filters.

Profile filters are defined as predicate expressions that execute against the endpoint profile. Distinct profile schema versions may require separate filters due to the structural differences. If a group has no filter assigned for a specific profile schema version, it does not apply to the endpoints that supply the profile of that schema version.

Every group in an application has a unique weight associated with it. The weight value is used to resolve conflicts among the groups: in general, the larger the weight, the higher the group priority.

Every Kaa application comes with a special, built-in, non-user-editable group "all" with weight 0. The associated profile filter is automatically set equal to "true" for every profile schema version in the system. This effectively makes group "all" contain every endpoint registered in the application. Group "all" is used to define the default configuration, default topics access list, and for some other special functions.

Profile filters

Profile filters in Kaa are based on the Spring Expression Language (SpEL). All filters must constitute predicates (resolve to boolean values).

For further reference on the filters syntax please refer to the Spring documentation. For some examples of what it is capable of, see the examples below.

Assuming the following profile schema:

and a specific endpoint profile as follows:

all of the filters in the table below would yield "true":

FilterExplanation
simpleField=='SIMPLE_FIELD'
The profile contains 'simpleField' with the value 'SIMPLE_FIELD'.
arraySimpleField[1]=='VALUE2'
The profile contains 'arraySimpleField' of array type, containing the element 'VALUE2' in the position 1.
arraySimpleField.size()==2
The profile contains 'arraySimpleField', which is a collection and contains two elements.
recordField.otherSimpleField==123
The profile contains 'recordField' of record type that has 'otherSimpleField' equal to '123'.
recordField.otherMapSimpleField.size()==2
The profile contains 'recordField' of record type, which has 'otherMapSimpleField', that is a collection and contains two entries.
arrayRecordField[1].otherSimpleField==789
The profile contains 'arrayRecordField' of array type. This array has an element in the position 1 of record type that has 'otherSimpleField' equal to '789'.
arrayRecordField[1].otherMapSimpleField[KEY5]==5
The profile contains 'arrayRecordField' of array type. This array has an element in the position 1 of record type that has 'otherMapSimpleField' of map type. The map contains an entry with the key 'KEY5' and the value '5'.
mapSimpleField[KEY8]==8
The profile contains 'mapSimpleField' of map type that contains an entry with the key 'KEY8' and the value '8'.
mapRecordField[SOME_KEY2].otherSimpleField==654
The profile contains 'mapRecordField' of map type that contains an entry with the key 'SOME_KEY2' and the value that is a record. The record has 'otherSimpleField' with the value '654'.
mapRecordField[SOME_KEY2].otherMapSimpleField[KEY12]==12
The profile contains 'mapRecordField' of map type that contains an entry with the key 'SOME_KEY2' and the value that is a record. The record has 'otherMapSimpleField' of map type that contains an entry with the key 'KEY12' and the value '12'.
mapRecordField[SOME_KEY2].otherMapSimpleField[
new java.lang.String('KEY13').toString()]==13
An example of how to use a new object instance in a query.
nullableRecordField==null
An example of how to check a field for the 'null' value.
arraySimpleField[1]=='VALUE2' and ((arraySimpleField.size()==2)
or (arrayRecordField[1].otherMapSimpleField[KEY5]==5))
An example of how to combine several conditions in a query.
!arrayRecordField.?[otherSimpleField==456].isEmpty()
The field 'arrayRecordField' is an array of records, and it contains at least one element that has 'otherSimpleField' with the value '456'.

Copyright © 2014, CyberVision, Inc.

  • No labels