This is an old revision of the document!
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).
Published Data Objects might provide “attractor” method. In this case Router forwards the objects to relevant Matcher.
The Matcher is likely to have many Subscription and Data objects with the same AHK and needs a way to rank and filter results.
The Matcher uses method “proximity” on Subscription object on each matching 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”:
- A parent creates Object of kind Subscription with objects filter “Need:BabySitter” with fields: gender, geolocation. Other optional fields “min age”, “max age”, availability hours and budget per hour might also be specified. The object has reference to object→method that is to be called on each match - likely notifications generator.
- The Object is exported and hits Router, that calculates hash Person-Gender-Geo and forwards it to Matcher node using DHT lookup.
- 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.
- The Object is exported and hits Router, that calculates hash Person-Gender-Geo and forwards it to Matcher node using DHT lookup.
- 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).
- Once on User's node, method “MatchFound” is called with array of candidate objects. It might then create results popup notification or show results.
