java - Collating/Managing data to populate "live activity feeds" in web app -


i have of abstract question regarding managing live feeds/polling on web sites.

i creating web app (built on java/spring/hibernate) , on user's home page want live feed of latest activity members of there team, , trying work out best way handle query on server side.

the brute force way load current users list of team mates, , iterate through each of team mates, loading latest conversations/file uploads/etc, , merging activity in single list sorted timestamp , returning (lets sake of example return top 10 latest activity feed).

however, seems un-performant, operation need done regularly (depending on polling interval).

i have considered making potential activities (conversations/status updates/uploads) extending activity class , having direct sql/jpql query in dao selects latest activity set of users returned, concerned might bypass caching , continued access db reduce performance.

has handled type of problem before? 1 know approach is?

thanks!

this old 1 now, here did this:

  1. all tasks should appear on live wall extend activity (this case)
  2. created new notification object, notification had link underlying activity , link user (who being notified).
  3. created pre-persist hook activity created notification object activity being persisted - did every user interested (all users following user persisting activity)

for moment, notifications persisted/retrieved db - possibly not scalable high volumes, approach think supports moving queue based system (such linkedin's kafka queue library designed purpose). per-user, provides option have read/unread notification flag significant notifications.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -