question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AWS WebSocket support

See original GitHub issue

I’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:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
jordaneremieffcommented, Jan 7, 2021

@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.

3reactions
eduardovracommented, Jun 10, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with WebSocket APIs - Amazon API Gateway
A WebSocket API in API Gateway is a collection of WebSocket routes that are integrated with backend HTTP endpoints, Lambda functions, or other...
Read more >
How to build real-time applications using WebSockets with ...
This functionality can be done through real-time applications. Amazon announced that they are going to support WebSockets in API Gateway at AWS ......
Read more >
Serverless WebSockets on AWS - DEV Community ‍ ‍
Very sub-optimal support for broadcast behavior. · Since you most likely already take advantage of Amazon API Gateway, the complexity of adding ...
Read more >
Intro to AWS WebSockets - Ready, Set, Cloud!
In AWS, a WebSocket is an API Gateway v2 resource. It supports the two-way communication between the client and server and allows you...
Read more >
Building a WebSocket Service with AWS Lambda & DynamoDB
Implementing WebSockets requires a persistent connection between two parties. Serverless functions are known for short execution time and non-persistent ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found