Charcoal-SE / halflife

Metasmoke back-end analysis client
Apache License 2.0
6 stars 2 forks source link

Halflife skips many posts #5

Open tripleee opened 6 years ago

tripleee commented 6 years ago

When two or more posts are reported in rapid succession, the second and subsequent posts are sometimes missed by Halflife.

Searching for tagged/skipped shows many such incidents.

I originally thought this was a problem with Metasmoke, but in fact, it's probably a bug in Halflife. It should pick up the websocket again quickly after a message is received in order to keep on listening properly.

Moving to async processing would probably fix this. (#2 #1)

tripleee commented 5 years ago

Not sure if this is really a problem; at least the vast majority of cases are when the same post is reported multiple times.

tripleee commented 5 years ago

Still this happens occasionally because (I think) the websocket polling is not async / threaded and so it misses whatever comes in while we are scanning the previous message.

double-fault commented 5 years ago

I'm not really sure on how Halflife works, but are you sure the messages are not being throttled?

tripleee commented 5 years ago

This is listening to Metasmoke's ActionCable websocket; pretty sure there is no throttling there, but maybe I should investigate that, too.

Sent with GitHawk

double-fault commented 5 years ago

Uh, I meant throttling with the chat interface, ChatExchange. Messages posted in quick succession get throttled by SE.

tripleee commented 5 years ago

Halflife doesn't chat at all, it just leaves its output in a log file which is then published on another websocket for PulseMonitor to eventually push to chat. (This does suffer significantly from chat throttling, but it's not a problem in Halflife. You can listen to the raw websocket to get a feel for how much additional overhead chat incurs.)

Sent with GitHawk

double-fault commented 5 years ago

Sorry, looks like my message was not clear enough; I was originally attempting to ask whether the messages have just been missed in chat (i.e, it is a PM problem), or have you seen them missing in the ws log.

Looks like the messages are missing in the log itself, so it is a Halflife problem indeed.

tripleee commented 4 years ago

The "skipped" notices seem to belong to posts which were reported more than once. I guess Metasmoke doesn't generate an event in that case (or the event is in a different form which the bot doesn't register it). Maybe this could be closed.

tripleee commented 4 years ago

Also, the ActionCable client only subscribes to "created" notices, so it will not receive notices of updated posts. I'll look into changing that.