uf:proximities
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| uf:proximities [2009/11/18 13:46] – moving elisag | uf:proximities [2009/11/30 16:42] (current) – proper dharnie | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Proximity | + | ===== Characteristic Function |
| - | Proximity | + | A characteristic function |
| - | * isNearby: physical proximity | + | * isNearby: |
| * isFriend: static encoding of friendship relationships | * isFriend: static encoding of friendship relationships | ||
| * doesProfileMatch: | * doesProfileMatch: | ||
| Line 9: | Line 9: | ||
| Other functions can be defined as combinations of existing functions by means or combinators: | Other functions can be defined as combinations of existing functions by means or combinators: | ||
| - | Proximities | + | Characteristic functions |
| + | |||
| + | ===== Example ===== | ||
| + | Programmers can make customised characteristic functions. In order to aid the programmer in this tasks we have defined some auxiliary functions and constructors. In the code shown bellow we make a characteristic function that maps the domain of persons onto the set of people who are both female and friends in the proximity. | ||
| - | As a first implementation of the RETE-network, | + | |
| + | < | ||
| + | def femaleProximity := makeDoesProfileMatchProximity(flockr1 , { |profile| profile.sex == " | ||
| + | def friendProximity := makeIsFriendProximity(flockr1); | ||
| + | def friendAndFemaleProximity := makeAndProximity(femaleProximity, | ||
| + | </ | ||
| + | |||
| + | ===== Implementation ===== | ||
| + | |||
| + | An ad hoc RETE-network. Events are triggered by: | ||
| + | * discovery: '' | ||
| + | * profile changes: '' | ||
| + | * friend changes: '' | ||
| + | |||
| + | These events are received by the local flockr user object and propagated to all local proximities. Characteristic functions translate these events into addUser / removeUser events to be processed by flocks. To process these events, flocks register themselves on their dependent function. | ||
| + | {{: | ||
| + | |||
| + | Alternative | ||
| < | < | ||
| Line 28: | Line 48: | ||
| - | It appears that some proximities | + | ===== Open Issues ===== |
| + | |||
| + | It appears that some characteristic functions | ||
| * does it make sense to combine isNearby and wasNearby? I think isNearby supersedes wasNearby | * does it make sense to combine isNearby and wasNearby? I think isNearby supersedes wasNearby | ||
| * isFriend can be combined with isNearby or wasNearby | * isFriend can be combined with isNearby or wasNearby | ||
| * there must be at least one of isFriend / isNearby / wasNearby | * there must be at least one of isFriend / isNearby / wasNearby | ||
| - | * there can be 0 or more doesProfileMatch | + | * there can be 0 or more doesProfileMatch functions |
| - | + | ||
| - | ===== Example ===== | + | |
| - | Programmers can make customised proximity | + | |
| - | + | ||
| - | + | ||
| - | < | + | |
| - | def femaleProximity := makeDoesProfileMatchProximity(flockr1 , { |profile| profile.sex == " | + | |
| - | def friendProximity := makeIsFriendProximity(flockr1); | + | |
| - | def friendAndFemaleProximity := makeAndProximity(femaleProximity, | + | |
| - | </ | + | |
| - | + | ||
| - | ==== Implementation ==== | + | |
| - | + | ||
| - | An ad hoc RETE-network. Events are triggered by: | + | |
| - | * discovery: '' | + | |
| - | * profile changes: '' | + | |
| - | * friend changes: '' | + | |
| - | + | ||
| - | These events are received by the local flockr user object and propagated to all local proximities. Proximities translate these events into addUser / removeUser events to be processed by flocks. To process these events, flocks register themselves on their dependent proximity. | + | |
| - | + | ||
| - | {{: | + | |
| - | + | ||
uf/proximities.1258548363.txt.gz · Last modified: (external edit)
