AdaCore / AdaCore/aws

remove websocket from fd_set when we know changes are pending

Open
#211 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ada
Stars
162
Forks
45
PR merge metrics
No merged PRs in 30d

Description

When I wrote a server (not based on AWS), I was also ensuring that sockets for which we got a notification in epoll() were removed from the FD_Set until we had actually read or written everything to/from it. Otherwise, that socket keeps popping up in epoll which is inefficient. Is something like this necessary here (perhaps a new Issue, though)

Originally posted by @briot in https://github.com/AdaCore/aws/pull/209#discussion_r633269740

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the server event loop and its epoll/FD_Set handling, then trace how notified sockets remain registered while pending reads or writes exist. Confirm the repeated-readiness behavior and define done as preventing unnecessary notifications without losing pending I/O; add or update coverage for that behavior if the project has a relevant test.

Written by the indexing model from the issue text.

Assessment

Domain
networking
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.