Storm topology to handle “dating website”-like workloads

suppose im writing a dating website, similar to okcupid. there are profiles, and i need to compute the (N^2) “match” table – given every 2 profiles whats the match between them?

I was thinking this could be done by creating a spout to listen on a “new/updated profiles” queue (say kafka, doesnt matter), but then how do I break down the matching to achieve any degree of parallelism?

If I have a single bolt that compares the profile vs the entire DB that wont scale.

If I create another spout, for “all profiles” it will run in a continous loop and never stop (?)

Obviously the assumption is that the “churn rate” (rate of new/updated profiles) is less of an issue than the sheer size of the database.

Any suggestions on how to design the topology would be very welcome.

4

The obvious answer to this problem is “don’t do N^2”, at least not for the full value of N – you can very rapidly reject large parts of your data set for all sorts of reasons:

  • Wrong sex. While I’m a liberal kind of guy, I’m still not interested in dating other guys. There may obviously be some exceptions to this – e.g. bisexuals.
  • Wrong country. It doesn’t matter how hot they are, I’m not going to want to date someone in Australia if I’m based in the UK. Again, there may be exceptions but most people aren’t looking for a long-distance relationship. (More generally, get people to say how far they’re prepared to travel for a relationship. New York to California probably isn’t going to work for most people).

There’s probably lots more criteria I haven’t thought of yet – by doing this you’ve hopefuly solved the “sheer size of the database” problem and got it down to something tractable.

As an aside, I suspect you’ll find Data Science of Love interesting viewing. Disclaimer: I know the presenter personally, but have no professional relationship with either him or eHarmony.

1

Although I have not worked in this area, it seems like this is the type of problem one would use something like Apache Giraph to handle. You essentially want a huge population of “things” which you suspect are “related” to each other possibly across a large number of dimensions, and you want to pair them up optimally based on the strongest matches.

You don’t want to hard code what those things are, the possible dimensions they may be related, and the rules that define each relationship. Not only would that be a lot of work, it wouldn’t scale well.

This link is a proprietary graph product, but does a good job showing how a graph data model would apply to online dating. Same concept could be done with Apache Giraph, or any other graph computational tool:

https://linkurio.us/recommendation-and-graphs-an-online-dating-use-case/

0

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật