pushshift / reddit_sse_stream

A Server Side Event stream to deliver Reddit comments and submissions in near real-time to a client.

Home Page:http://stream.pushshift.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handling disconnections and reconnects using "Last-Event-ID"

pushshift opened this issue · comments

It's currently unclear to me how "Last-Event-ID" is handled when there are multiple types of events. Does it just send the last event id seen regardless of event type?

In any case, parameters need to be added to start the stream from a certain point. Perhaps parameters like:

comment_start_id and submission_start_id where the stream will start sending data beginning with those ids (inclusive) and then go from there.

Currently, the previous 4 hours of Reddit comments and submissions are buffered in Redis. If a connection were to break, the client would need to reconnect within that time in order to not lose any data.