Use queues for app events #7

Open
opened 2024-01-24 16:50:34 +00:00 by philip · 0 comments
Owner

Currently, std::sync::mpsc::channel is being used. Drawbacks:

  • Rather complicated
  • Storage of the app events is unclear
    • What if a channel breaks?
    • Potential memory leak if app does not or only rarely poll events, but many events are produced?

Using a queue per app makes more sense. It can have a limited size, and it is always clear which events are stored and where. Still, concurrency should work properly.

I have not found a crate providing such a queue yet, it may need to be implemented in ubisync.

Currently, `std::sync::mpsc::channel` is being used. Drawbacks: - Rather complicated - Storage of the app events is unclear - What if a channel breaks? - Potential memory leak if app does not or only rarely poll events, but many events are produced? Using a queue per app makes more sense. It can have a limited size, and it is always clear which events are stored and where. Still, concurrency should work properly. I have not found a crate providing such a queue yet, it may need to be implemented in ubisync.
philip added this to the v1 milestone 2024-01-24 16:50:34 +00:00
philip added the
Kind/Enhancement
label 2024-01-24 16:50:34 +00:00
philip added the
crate/ubisync
label 2024-02-11 14:23:03 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: philip/ubisync#7
No description provided.