a bit off-topic, it's funny you use all this fancy technology behind the scenes and your iOS app is buggy, slow and always problems with login and notifications which do not update. TLDR; Awful
Almost feels like frontend and backend teams are separate!
Geosharded Recommendations with Hilbert Curve at Tinder
31–40 of 47 posts
Re: Geosharded Recommendations with Hilbert Curve at Tinder
#32Using a Hilbert Curve for indexing is a pretty standard approach for geospatial queries. Nothing new here... However, using a Hilbert Curve for sharding doesn't seem like the best approach. You can partition by anything you like, it doesn't have to be arbitrary points along your index. Using 1-dimension to shard 2D data isn't optimal. For example, construct a heatmap of your 'load score' and shard based on that, in t…
However, using a Hilbert Curve for sharding doesn't seem like the best approach. Yes, that's also what I thought. Searching for "same size k-means" yields a simple postprocessing step to even out the clusters produced by the usual k-means algorithm. EDIT: k-means is adapted directly here: https://elki-project.github.io/tutorial/same-size_k_means
Re: Geosharded Recommendations with Hilbert Curve at Tinder
#33Using a Hilbert Curve for indexing is a pretty standard approach for geospatial queries. Nothing new here... However, using a Hilbert Curve for sharding doesn't seem like the best approach. You can partition by anything you like, it doesn't have to be arbitrary points along your index. Using 1-dimension to shard 2D data isn't optimal. For example, construct a heatmap of your 'load score' and shard based on that, in t…
Re: Geosharded Recommendations with Hilbert Curve at Tinder
#34https://github.com/Qbix/Platform/tree/master/platform/plugin...
First of all, we normally do our sharding by the hash of the primary key. Typically it is the publisherId and hash of the name of a “stream”, which is our general dynamic data structure. What this does is essentially distribute the load evenly between hashes without having to worry about the “water” stuff mentioned above.
Ok now about location based search...
1. We use GeoHash for addressing the surface of the Earth. For lookups, we calculate actual corners of the lat-lng rectangle in Haversine distance and then translate it to geohash.
2. Technically we could have just used a database index at this point and be done with it. But we want to handle both PULL requests and PUSH notifications when something happens nearby.
3. So given a radius the subscriber is interested in, we set up 4 streams for SUBSCRIBERS that together (as rectangles) cover the circle surrounding the location and radius.
4. Then we also set up streams for PUBLISHERS which correspond to all the various drop-down values we have for the radius. This is compicated by the fact that we have one set for metric system and another for imperial. But we just make one stream for each of them. The more radii available the more streams you have to post to (like 10-20) but posting doesn’t happen that often and it’s better to precompute this stuff.
5. Relations between streams are one of the many features that streams do out of the box. So basically the user can just subscribe to a certain location and radius, interest, etc. and get either realtime updates or offline notifications. The item being posted is itself a stream and what’s being inserted is relations between it and the category stream the person is interested in.
Thus you can also see right away who is interested in what. In the future however we plan to encrypt the data end to end so the servers won’t know this info. Then the location search will be harder. (qbix.com/blog)
Re: Geosharded Recommendations with Hilbert Curve at Tinder
#35Earlier quoted context omitted.
Yeah it seems like the real bottleneck is that in these super dense areas, there might be a ton of shards in a mid-size radius. This is inevitable since in the middle of Manhattan, there are just a lot of people in a small area. One solution would be to scale their recommendation radius with density; no need to look farther than 5 miles for true love in Manhattan, but in Wyoming you may have to drive a bit.
The flip side though is that you don't need to show everyone to everyone, you just need to make sure people have enough other people to swipe. This opens up all sorts of other optimizations, and makes the use of an actual search engine seem a bit weird to me.
Re: Geosharded Recommendations with Hilbert Curve at Tinder
#36Why not Z-order curve instead? Hilbert is more complex to compute...
Re: Geosharded Recommendations with Hilbert Curve at Tinder
#37I’m sorry, but Tinder and similar swipe-on-photos cargo-cult hookup apps have de facto cannibalized the online dating-scene with its entire focus on appearance (and atrophying genuine communication), promoting a major captological phenomenon of manipulating women into rating men more negatively based on nothing other than appearances. It contributes to unrealistic expectations, disposable interactions, paradox of cho…
I find it far more rewarding to try to hack the awful world around me instead of complaining how awful the world is/is becoming.
Re: Geosharded Recommendations with Hilbert Curve at Tinder
#38Why not Z-order curve instead? Hilbert is more complex to compute...
They mentioned the distortion near the poles when using geohashing (which uses z-order curves), but I doubt they have many users at the North or South Pole.
Re: Geosharded Recommendations with Hilbert Curve at Tinder
#39I’m sorry, but Tinder and similar swipe-on-photos cargo-cult hookup apps have de facto cannibalized the online dating-scene with its entire focus on appearance (and atrophying genuine communication), promoting a major captological phenomenon of manipulating women into rating men more negatively based on nothing other than appearances. It contributes to unrealistic expectations, disposable interactions, paradox of cho…
If you have the time and preference to meet people face to face, you can still do that. People still do that and Tinder is a nice supplement.
But many of us look at dating as a numbers game. And Tinder is a hell of an upgrade to sending messages to women on other dating platforms where you don’t even know if they like your skin color. That’s a waste of time.
You don’t need to be perfect to get Tinder dates. But being ugly in this world with or without Tinder already stacks cards against you. Tinder is not so different from cold-approaching women at the bar. Except in Tinder you know she is more likely to give you a shot beforehand. But you have to trade away the ability to charm her in person. Why does it bother you so much that many people like tht trade-off?
Your post reeks of someone who’s mad that all those attractive people seem to be fucking everyone but you. Dating is hard. I’m willing to try many paradigms/sources at once to date at my desired level. If I was meeting new women every week through my social circle (the ideal imo) then I wouldn’t use Tinder or go out just to find single women, but until then...
If you’re not happy with your dating life, then maybe consider increasing your hustle yourself and/or find the approaches that work for you. Maybe Tinder just isn’t for you, but seems a bit outward to turn it into technosocial criticism.
Re: Geosharded Recommendations with Hilbert Curve at Tinder
#40Earlier quoted context omitted.
Yeah it seems like the real bottleneck is that in these super dense areas, there might be a ton of shards in a mid-size radius. This is inevitable since in the middle of Manhattan, there are just a lot of people in a small area. One solution would be to scale their recommendation radius with density; no need to look farther than 5 miles for true love in Manhattan, but in Wyoming you may have to drive a bit.
The flip side though is that you don't need to show everyone to everyone, you just need to make sure people have enough other people to swipe. This opens up all sorts of other optimizations, and makes the use of an actual search engine seem a bit weird to me.