Skip to content

frontend skips messagesΒ #23

@devensiv

Description

@devensiv

There is a race condition while opening a room.
There might be messages received from the peer before the front-end starts "listening" for the the message_received event causing the message to never arrive in the front-end

I have 2 possible solutions for that in mind:

1. Ping-Pong-Peng

front-end implementation of something similar to the P3 maneuver that we use in hole-punching
-> this requires 2-3 messages to be sent by both either side of the conversation (best case 4 messages in total, worst case 5 messages in total)

2. more events

front-end sends an event to the back-end to let it know that it can now emit messages_received events
-> to do this properly this requires caching messages in the back-end

3. Dirty Solution

The dirty solution would be to add a delay before we start to send messages after opening a room.
-> for sensible delays this just makes the occurrence less likely and does not solve the core problem
-> this is the least work

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions