Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3761386
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:37:05+00:00 2026-05-19T10:37:05+00:00

I need to build an activity feed (stream? A lifestream to be more accurate.)

  • 0

I need to build an activity feed (stream? A “lifestream” to be more accurate.) for a system similar (same) in resemblance to many popular social networking platforms. My initial attempt was to use an RDBMS but quickly dropped the idea due to the vast amounts of JOINs needed. Scavenging for other possible (and better-suited) approaches, I stumbled upon the following post:

How do social networking websites compute friend updates?

Taking the advise to make use of a message queue, I have spent some time studying RabbitMQ and its PubSubHubbub protocol. And I postulated the following approach:

1) Each user has a “topic”
2) Other users subscribe to the topic
3) When the user performs some action, a message is published which is then related (References resolved), formatted (Human-friendly language, links, etc.) and aggregated (X, Y and Z have commented on post P) with a PHP-script.

However, I would still have to go through each message and process it (unless my approach is completely wrong). So, what would the difference be between storing everything in a RDBMS and using a message queue (other than the implementation of the PubSubHubbub protocol)?

Are there more efficient ways to build such a system? (If so, please specify)

Comments / Suggestions / Criticisms are welcome. 🙂

Thank you in advance!

P.S.: There is an interesting article on how FriendFeed implements it ( http://bret.appspot.com/entry/how-friendfeed-uses-mysql ). However, I feel the “hackery” pushes MySQL out of it’s comfortable domain (which is simply Relational Data and what would be the point of using an RDBMS without relational data?)

P.P.S.: Another issue using a message queue that I see (perhaps, due to me being new to this technology) is that once the message is fetched by the “Consumer”, it is removed from the queue, however, I want it to persist for an arbitrary amount of time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T10:37:05+00:00Added an answer on May 19, 2026 at 10:37 am

    Some tips I would like to give you:

    • Don’t use a RDBMS, but an in-memory(FAST) database like for example redis. As hopefully you agree with me from the redis benchmarks, redis is pretty fast. As another sidenote I would like to point out installing redis is child’s play :).

      make

    There is a redis-client for PHP which uses C so that is also going to be very fast.
    – If I understand you correctly you think that pubsubhubbub is the same as a message queue but they aren’t:

    Parties (servers) speaking the
    PubSubHubbub protocol can get
    near-instant notifications (via
    webhook callbacks) when a topic (feed
    URL) they’re interested in is updated.

    Versus message queue:

    In computer science, message queues
    and mailboxes are software-engineering
    components used for interprocess
    communication, or for inter-thread
    communication within the same process.
    They use a queue for messaging – the
    passing of control or of content.

    You might think they are the same(they have some similarities), but they aren’t the same. For my message queue I would redis(redis is very powerfull because it also has a basic message queue :)). You could put message(unit of work) onto a queue using rpush.

    rpush <name of queue> <message>
    

    Then from your worker processes you could receive messages from the queue using brpop(blocking pop :))

    brpop <name of queue> 0
    

    The workers process spawn are going to be started from the cli to stay in memory so aren’t going to have overhead loading PHP in memory again and again.

    php worker.php
    

    I hope this is hopefully for you and if you might have any question I am very willing to answer them 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to build an activity feed to go on each users profile page
I need to build a push system in django, basicly its function is to
Situation I run a build system that executes many builds for many project. To
Currently I am following this GitHub project called Django-Timeline to build an activity feed:
If I were to build a newsletter emailing system, I will need to be
This I'm trying for transfer my current Apache/Modperl site to Starman, and need build
I need to build app with user messages (dialogs). I've solved this problem by
I need to build a feature like most of the banks use. Where.. if
I need to build a keystore with all the needed SSL certificates to make
I need to build some client side code which follows this use case: An

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.