• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Real-time Streaming - not sure if my nodebb installation is working

Scheduled Pinned Locked Moved General Discussion
11 Posts 3 Posters 4.4k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    noobbb
    wrote on last edited by noobbb
    #1

    Hi,

    I'm not sure if my nodebb is working normally. How fast is real-time streaming supposed to be? Can I make it faster? like updates every 1-2 seconds?

    I saw this on the nodebb home page

    Real-time Streaming - Interact with your userbase faster than ever before with instant notifications, streaming posts, and real-time chats.

    PitaJP 1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to noobbb on last edited by
    #2

    @noobbb it should update immediately. However, I believe the connection is shut down after a certain amount of inactivity.

    N 1 Reply Last reply
    1
  • N Offline
    N Offline
    noobbb
    replied to PitaJ on last edited by
    #3

    @PitaJ Ahh I see. Is there anything I can do to keep the connection alive or make it reconnect faster?

    1 Reply Last reply
    0
  • barisB Offline
    barisB Offline
    <baris> NodeBB
    wrote on last edited by baris
    #4

    Here is a really dirty hack. You can put it in your custom JS section in the ACP

    var refreshTimeoutId = 0;
    $(window).on('action:ajaxify.end', function () {
            if (!app.user.uid) {
                 return;
            }
    	if (refreshTimeoutId) {
    		clearTimeout(refreshTimeoutId);
    	}
    	refreshTimeoutId = setTimeout(ajaxify.refresh, 300000);
    });
    

    This will cause the page to refresh after 5 mins of inactivity hence marking the user online again, after that they should keep receiving realtime notifications.

    N 1 Reply Last reply
    2
  • N Offline
    N Offline
    noobbb
    replied to <baris> on last edited by
    #5

    @baris Thank you for this.

    N 1 Reply Last reply
    0
  • N Offline
    N Offline
    noobbb
    replied to noobbb on last edited by
    #6

    @noobbb I added the code to acp > appearance > custom html/css > custom header

    then I restarted nodebb

    I used a guest account to reply. The other account, which I am logged in with, always immediately gets a notification sound and message box at the bottom right so that's working perfectly. However, the message/post itself usually does not appear until I refresh the page. It does appear sometimes - usually if I have waited a while to reply first - seems like a cool down period is required? If I rapid fire a bunch of replies, they won't live stream.

    Can I make it always live stream? Thanks.

    1 Reply Last reply
    0
  • barisB Offline
    barisB Offline
    <baris> NodeBB
    wrote on last edited by
    #7

    We don't have a cooldown for the instant replies, they should show up if you are at the bottom of the topic.

    N 1 Reply Last reply
    1
  • N Offline
    N Offline
    noobbb
    replied to <baris> on last edited by
    #8

    @baris Hmm. What options do I have to make real time streaming work? Do I need to reinstall nodebb?

    PitaJP 1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to noobbb on last edited by
    #9

    @noobbb open a bug on Github and we'll see if we can reproduce the issue. If it's not streaming posts, it's a bug.

    N 1 Reply Last reply
    1
  • N Offline
    N Offline
    noobbb
    replied to PitaJ on last edited by
    #10

    @PitaJ Will do. Thanks.

    1 Reply Last reply
    0
  • N Offline
    N Offline
    noobbb
    wrote on last edited by noobbb
    #11

    So, I tried opening a bug on github, but the devs couldn't replicate the issue on their end. Would anyone be able to point me in the right direction? eg the code that is responsible to making new replies "live stream"? I found a few candidates to investigate

    http://i.imgur.com/1Ud2a8l.jpg

    but I'm not sure if I'm on the right track. Thank you.

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development