ring-clojure / ring-clojure/ring
Spec support for connection close notification
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 3.9k
- Forks
- 528
- PR merge metrics
- No merged PRs in 30d
Description
The Ring spec provides no mechanism for applications to be notified when a client connection is closed. This limitation is particularly relevant for long-lived streaming responses (e.g., Server-Sent Events), where the server may wish to release resources as soon as the client disconnects.
Currently the only way for the streaming server to discover the connection has been closed is to attempt a write to the output stream and catch the failure.
Some servers, such as http-kit (via its AsyncChannel) and Aleph (via manifold streams), already offer this functionality.
This issue is to open a discussion on whether and how the Ring spec could define a standard way for applications to observe the connection closure event.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Ring specification and the issue’s examples of http-kit’s AsyncChannel and Aleph’s manifold streams. Compare how those systems expose connection closure and determine what a portable Ring-level mechanism would need to define. Done means reaching agreement on a proposed standard behavior and documenting its scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100