Jump to content

Live Module


Garthilk

Recommended Posts

Posted

Of course. [img]

[/img]



We're open to suggestions on this, we just have to make sure we can implement those suggestions in a cross-platform manner (meaning, we can't tailor it to server-cluster setups only, whatever we do also has to work on shared hosting as well).




Brandon, thanks for the above explanation.

Could one possible solution be to make each 'activity' optional via the admincp? For instance, the way I see something like this working is that whenever a particular activity occurs, its inserted into the db. For instance:
User registers
User logs in
user creates a new thread
user posts a reply to a thread
etc...

if activities (or 'groups' of activities) could be tuned on and off via the admincp, it would be an easy way to tailor the output to suit your server environment.

An additional option would be to be able to specify the amount of time the data is persisted for (i.e. after 24 hours the data is deleted).

Anyhooo - just a few 'off the cuff' thoughts
Posted

Those would be useful, yes. Also, it's probable that using this data purely for an activity stream (as opposed to searching, which was the original intent) would put a lot less strain on the server. Naturally doing complicated fulltext searches of such a table as I described can be problematic, where-as pulling x rows ordering by date for a specific member isn't going to be nearly as intensive on mysql's end to process.

  • 5 months later...
Posted

Huge bump.

But has there been any further thoughts on this?

If not, when I get the time I might try and implement this with IP Content and a bunch of hooks. I don't know what the hooks would be called, but I'm guessing insert a new row into an IP Content DB on postTopicCreate, postStatusUpdate, postRegister. And a few custom ones for me, postVideoUpload, postFeedbackSubmit etc.

Then simply use IP Content to create a feed and bosh it onto the forum index page.

Sounds simple enough - and I don't see how it would be that resource intensive. Probably around 200-300 inserts per day in total on my forum.

Posted

To be honest, this seems more a job for database triggers. Both MSSQL and MySQL (the two officially supported RDBMS engines) support them, they're considerably more efficient than firing more SQL queries, and they're asynchronous so don't block the application. Couple that with a cleanup task run every hour to keep the table trim...

Posted

I believe theres a sidebar hook called latest discussions that does a live feed of the last post.



It crashed my forum. :P




On a large forum, that's not surprising. The posts and topics tables are the largest in the DB on a large install, and anything that has to lock them causes serious damage to performance. You can mitigate this by using MSSQL instead of MySQL (MSSQL has smarter locking semantics) and creating an index on any fields used in the criteria of that hook's select query. You could also alter your IPB code to perform a SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED before executing the query (the MySQL equivalent of WITH NOLOCK).

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...