I'm going to work on an inspiration site for a NGO, and I'm looking to implement some sort of Facebook-esque event stream, with events like “Michael recommended apple pie”, “John commented on chocolate cake”, “Caramel fudge was posted 8 hours ago by Alice”, etc.
The thing is that these events are interest-based, so someone only be interested in caramel and cherries and should not see apple pies or chocolate cakes then. There are a lot of permutations for this, and generating a user’s personalized event stream on the fly would mean some rather expensive database-queries.
So my thinking was to pre-generate a relation between the receiving user and the posted event (probably a simple SQL JOIN-table) by doing some sort of background processing whenever an action event is happening.
The work required to weigh the preferences of hundreds of users against an event is bound to be substantial, so it cannot be done as a part of POST request that triggers the work, so I’ll have to do a lot of the work in a different process. I’m currently looking at Gearman for this task, but I’m very open to suggestions.
I’m not looking for someone to do my work for me, but if anyone has any prior experience with building this sort of thing, I'd love to hear your thoughts.