simple-websockets-chat-app | SAM application provides the Lambda functions | Serverless library
kandi X-RAY | simple-websockets-chat-app Summary
kandi X-RAY | simple-websockets-chat-app Summary
This is the code and template for the simple-websocket-chat-app. There are three functions contained within the directories and a SAM template that wires them up to a DynamoDB table and provides the minimal set of permissions needed to run the app:.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of simple-websockets-chat-app
simple-websockets-chat-app Key Features
simple-websockets-chat-app Examples and Code Snippets
Community Discussions
Trending Discussions on simple-websockets-chat-app
QUESTION
Following this example project: https://github.com/aws-samples/simple-websockets-chat-app
The onconnect method looks like this:
...ANSWER
Answered 2020-Sep-08 at 17:55To pass parameters when connecting: wss://path.to.socket?param1=value1¶m2=value2
.
If using wscat you might need to add quotes:
QUESTION
I'm looking at AWS API Gateway websockets support, announced relatively recently -
https://aws.amazon.com/blogs/compute/announcing-websocket-apis-in-amazon-api-gateway/
They have a sample chat server example -
https://github.com/aws-samples/simple-websockets-chat-app/blob/master/sendmessage/app.js
which I have running, very nice.
If you send a message, the sendmessage
Lambda broadcasts that message to all connected users via the following -
ANSWER
Answered 2019-Oct-10 at 12:59It isn't called simple-websockets-chat-app for nothing :)
By reading the code, it does exactly what you are concerned about. Only one lambda instance will fire the message to all connections.
But it's a chat room, is it common to have thousands of users ?
It also looks as if it's working asynchronously, via use of async and await keywords, which I guess are Promises
Yes, it works in an asynchronous way, but the lambda will still execute until all messages have been sent.
About
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install simple-websockets-chat-app
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page