1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

An Activity Plugin that is 'Live'

Discussion in 'Plugin Suggestion Box' started by nothingman, Jun 6, 2013.

  1. nothingman

    nothingman Active Member

    Pligg being a fork of meneame.net, I remember it having the 'Live' page, which was similar to http://e.meneame.net/sneak.php. What Pligg's Live page lacked was an input box on the Live page that let users 'shout' out 'what they are doing/thinking etc - to check this out, you can login to http://meneame.net and see it in action (http://e.meneame.net/sneak.php).

    Just thought that this would make the current Activity page of HotaruCMS come 'alive' instead of having to manually refresh the page. What say folks? :)

    For those interested in checking it out, HERE's meneame's source code (quite an old version) and HERE's the translation in English done by Yours Truly :eek:
     
  2. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    This is not for release yet and may not be at any time, but as a demo I made this
    http://ipadrank.com/activity/

    At the moment you have to hit the refresh button to update the stream

    The problem with scripts that run every minute or so and hit your server is that you are getting a lot of traffic for these updates even if the user has left their pc on running by itself. It looks great for 1 user, but its not great when you have 100 machines pinging you every minute of the day.

    Ajax long polling is one way to handle it by keeping a connection open between the server and user, but its very messy with php. Microsoft have SignalR for their .NET framework which looks brilliant, but I havent seen anything for php yet. Does anybody have any knowledge on this?

    Other limitations
    The demo I have here is deliberately inserting the ----- characters so you can see the refresh point
    If you leave the browser open for a day and then come back and refresh you will get hit with all activity updates since the last one on the screen. That could be a lot of data, which may crash the browser.
    I am passing back html instead of json data, which means the overhead is larger. Ideally you would pass back just the data and then format in the browser
    The timestamp of the old activity is not updated when the refresh happens
    The activity list has pagination at the bottom, but it doesnt know anything about the new data coming in on refresh
    As you refresh the list grows longer and longer, without removing any items from the bottom

    Ideas
    There are ways around some of these problems and the point of the demo is to show the data is available. How we use it and format it should be discussed first
     
    nothingman likes this.
  3. nothingman

    nothingman Active Member

    Thanks for the answers, Shibuya. I can't say much about the database overhead but if I remember correctly (while fiddling with meneame), the data on their Live page is 'temporary' - as in, the data on the Live page is 'flushed out' from the database after, say 30 updates/activities (there was a php file where you could change the settings). Just thought I'd share.
     
  4. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    no problems.
    the problem is not the amount of data in the database, it is the number of calls that are being made on the server itself
     

Share This Page