adafruit / adafruit/Adafruit_CircuitPython_HTTPServer

[Enhancement Request] Asynchronous HTTPServer using asyncio

Open
#109 10 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
52
Forks
30
PR merge metrics
No merged PRs in 30d

Description

HTTPServer counterpart to: [Asynchronous HTTP Requests using asyncio](https://github.com/adafruit/Adafruit_CircuitPython_Requests/issues/134)

There has been some work to get asyncio working with sockets: https://github.com/adafruit/circuitpython/pull/7173

That code generally works (and can be [expanded](https://gist.github.com/anecdata/89b4458fd7c0c01c7fc0a9ff4be5b4e6) to multiple servers and / or multiple clients), but relies on methods `asyncio.core._io_queue.queue_read` and ` asyncio.core._io_queue.queue_write` in the `IOQueue` [class](https://github.com/adafruit/Adafruit_CircuitPython_asyncio/blob/24818f817f5118f59aa696a04776049c179c0f4f/asyncio/core.py#L159), which may not map to a CPython object.

The Adafruit `asyncio` library has a [TCP] `Server` class, not sure if it is complete or if it is the appropriate level of abstraction for HTTPServer.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the related asynchronous HTTP Requests issue, the asyncio core.py IOQueue implementation, and the existing TCP Server class. Compare queue_read and queue_write with the CircuitPython socket behavior described in the issue. Done is not defined beyond determining an appropriate HTTPServer abstraction and implementing its asynchronous counterpart.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, embedded-iot, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.