User Tools

Site Tools


f1x:archtecture:attraction-proximity

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
f1x:archtecture:attraction-proximity [2025/02/20 05:35] arief1x:archtecture:attraction-proximity [2025/02/20 21:25] (current) arie
Line 1: Line 1:
 ====== Attraction/proximity ====== ====== Attraction/proximity ======
  
-To discover objects of same kind "attraction/proximity" mechanism is used. It is based on special "Subscription" object providing method "attractor" that results in multidimension KV list defining "attractor hash key" (AHK). The key is used by Router to route the object to Matcher node using DHT-like scheme. It sits there until its TTL expires (future: when its resource limit is exhausted).+To discover objects of same kind "attraction/proximity" mechanism is used. It is based on special "Attraction" object providing method "get_ahk" that results in multidimension KV list defining "attractor hash key" (AHK). The key is used by Router to route the object to Matcher node using DHT-like scheme. It sits there until its TTL expires (future: when its resource limit is exhausted).
  
-The Matcher is likely to have many Subscription and Data objects with the same AHK and needs a way to rank and filter results.+Published Data Objects might provide "get_ahk" method. In this case Router forwards the objects to relevant Matcher.
  
-The Matcher uses method "proximity" on Attractor and other matching object to find proximity score. This and amount of "matching" objects define amount of references to objects to be sent to Attration initiator.+The Matcher is likely to have many Data objects with the same AHK and needs a way to rank and filter results, based on voluntary fields. 
 + 
 +The Matcher uses method "proximity" of Attraction object on each matching Data object to find proximity score. This and amount of "matching" objects define amount of references to objects to be sent to Attration initiator.
  
 Sample flow for case "Need to find nearby female babysitter not younger than 13 tonight, with budget of 20 nis per hour. Minimum 4 hours": Sample flow for case "Need to find nearby female babysitter not younger than 13 tonight, with budget of 20 nis per hour. Minimum 4 hours":
  
-  - A parent creates Object of kind DHT and object "Seeking:BabySitter" with fields: gender, geolocation. Other optional fields "min age", "max age", availability hours and budget per hour might also be specified+  - A Parent creates Object of kind Attractor with objects filter "BabySitter" with mandatory (geolocation) and voluntary (gender, "min age", "max age", availability hours and budget per hour might) fields. \\  \\ The Attractor object has reference to object→method that is to be called on each match - likely notifications generatorThe object is at work in three places: \\       - At Matcher node, that handles the AHK. The node forwards top 10 matching objects (in order of proximity) to realm of the Attractor object through its Router. \\ 
-  - The Object is exported and hits Router, that calculates hash Person-Gender-Geo and forwards it to Matcher node using DHT lookup+      - At Router node, that acts on behalf of the realm - here it forwards matching objects to Realm node \\ 
-  - A girl creates Object of kind DHT and object "Candidate:BabySitter" with fields: gender, geolocation. Other optional fields age, availability hours and minimum payment per hour might also be specified+      - At Realm node itself - here the callback is called for each matching object \\ 
-  - The Object is exported and hits Router, that calculates hash Person-Gender-Geo and forwards it to Matcher node using DHT lookup+  - The Attractor Object is exported and hits Router, that uses method "get_ahk" to get AHK. The object is then forwarded it to corresponding Matcher node. \\ 
-  - Matcher node matches Attractor and matching objects, uses "proximity" method to create list of candidates, ordered by proximity score, to be sent back to User (via his Router node). +  - A girl publishes Object of kind "BabySitter" with AHK fields: gender, geolocation. Voluntary fields are age, availability hours and minimum payment per hour. \\ 
-  - Once on User's node, method "MatchFound" is called with array of candidate objects. It might then create results popup notification or show results.+  - The Object is exported and hits her Router, that uses "get_ahk" to find appropriate Matcher node. \\ 
 +  - Matcher node sees Attractor and matching BabySitter objects, uses "proximity" method to create list of candidates, ordered by proximity score, to be sent back to the Parent's realm (via his Router node). \\ 
 +  - Once on Parent's node, the "Foundcallback method is called. It might get list of "Visible" candidate objects and decide what to do about them (create results popup notification or show results).
  
  
f1x/archtecture/attraction-proximity.1740029700.txt.gz · Last modified: 2025/02/20 05:35 by arie

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki