Real-time updates

(Kudu) #1

How do real-time updates work? Are they really “real-time” (e.g. Socket.IO) or is the server just polled periodically? Sorry if this has already been answered.

(Régis Hanol) #2

This has indeed already been asked:

TL;DR - Discourse uses a long-polling mechanism available through the message bus.

Not everything is updated in real time yet:

(nXqd) #5

I have a question that why don’t we update new replies in real time at the moment ?

(Jeff Atwood) #6

Can you explain what you mean by “update new replies”?

(nXqd) #7

Sorry for not being clear. I meant why don’t we update new replies at real time.
I have tried to create a new topic in to test if it notifies when we have new reply in that topic but it doesn’t.

(Jeff Atwood) #8

Your notifications (at the top right) will be updated in real time if someone replies to you. That should be sufficient.

(nXqd) #9

Ok, I didn’t notice that. And I agree, that once I notice it, it’s sufficient enough. Thanks :slight_smile:

(probus) #10

Would it be possible to get edits updated in real time when reading a topic like new posts do?

An example use scenario would be following a live event and commenting real time with other posters. Edits make the topic easier to read later but harder to follow real time as one needs to refresh the page frequently.

(Jeff Atwood) #11

Forums aren’t really big on edits, per se, so probably not.

New topics, new replies, sure. We try to be real-time on that as much as we can.

(Erik Paulsen Skålerud) #12

Does this mean that a chat feature (like SE’s rooms) is on the table once all the realtime updates are done?

(Jeff Atwood) #13

Chat feature is something @sam is fond of, but I am not. Mostly I support it only as a way to diagnose the message bus.

(probus) #14

Is there a technical reason, or you don’t just have the time to do it?

The forum educates in a pop-up when posting:

It’s easier for everyone to read topics that have fewer in-depth replies versus lots of small, individual replies.

But as it is, we are encouraging people to post individual replies instead of edits when adding incremental updates to their posts. Unless you have a strict question and answer type of forum, chances are you have these kinds of topics, i.e. sports forums have match day topics, apple forums have wwdc keynote following topics etc.

How about combining subsequent replies (from the same poster) into one with some server side magic or styling? Sound a bit weird but it could help keep things tidy.

Combining multiple sequential replies from the same poster?
(Jeff Atwood) #15

Not really, other than edits are not that common, and not the point of a forum – it’s not a wiki entry.

So it’d be a feature that few people would benefit from, if implemented. If replies actually updated as they were edited, based on my knowledge of average Discourse user habits, it would be mostly invisible to the readers of the topic.

I would like to get to real-time update of edits (and other flavors of real time updates) eventually though.

(Sam Saffron) #16


edits are now updated real time.

Looks like it works

(Jeff Atwood) split this topic #17

I moved 4 posts to a new topic: Do real time updates drain mobile battery faster?

Do real time updates drain mobile battery faster?