AWS WebSocket support
See original GitHub issueI’ve removed the existing WebSocket support as part of https://github.com/jordaneremieff/mangum/issues/127 with the intention of developing it outside of this package, then later migrating it back in (if it makes sense to do so). My main concern is that I want to avoid impacting the stability of the HTTP implementation which is the primary use-case, and the maintenance burden was too much for the amount of capacity I have to spare currently. I also want to re-design it with broadcast support as an initial requirement rather than a feature added on later.
I think a new project might use Mangum as a dependency, or could end up looking something like this:
from mangum import Mangum
from mangum_ws import MangumWebSocket
def handler(event, context):
if 'eventType' in event['requestContext']:
asgi_handler = MangumWebSocket(app)
else:
asgi_handler = Mangum(app)
return asgi_handler(event, context)
Not really sure. I haven’t been motivated to take this up for awhile, but if anyone wants to give it a shot I can help where possible.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:17 (9 by maintainers)
@satyajitghana I’ve note had a chance to come back around to this and likely won’t for awhile, but I was thinking about how to accommodate a plugin system to more easily integrate potential solutions for this kind of thing. Once I have made any progress here I’ll update the ticket.
Hi, I’ve created the draft PR (#190) and left a few questions. This is my first attempt to contribute to the project and any help will be much appreciated.