-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the roster automatically when someone joins the user's current Seder #250
Comments
Other uses of WebSockets can follow this, like pushing state changes to participants when the ringleader says everyone has joined. |
Reference
|
TODO
|
gh-250 This rename has to happen because I'm about to have additional Lambda functions, specifically handlers for WebSocket events.
Prior to my creating a production build artifact, my backend Lambda code is 25 M zipped, 128 M unzipped. Update: It's now 8.7 M zipped, 50 M unzipped. |
gh-250 I want an asset bundle for my backend Lambda source that excludes dev dependencies, especially the tree rooted at jest, which brings in a lot of sizable deps.
gh-250 See the parent commit to this commit for motivation.
I think WebSocket Lambda code will just live in the backend/ directory side by side with the backend Lambda code. |
Helpful code sample showing the types for Lambda's |
gh-250 These are similar to the handlers and WebSocket API in room-app at https://github.com/dan-muller/room-app/blob/cf619d372222dcedaafd760fb28dbc97a9a0e488/packages/cdk/lib/room-app-stack.ts.
gh-250 I will probably not do this in prod. I want to verify that when cookies go in a wss request: 1. The cookie will arrive at the WS API and be logged. 2. The cookie will or will not (not sure which) be sent along with messages after the initial wss connection. 3. Cross-origin WSS requests work, while cross-origin REST requests do not.
gh-250 My last CloudFormation deployment failed with "Invalid request provided: AWS::CloudFront::OriginRequestPolicy" I think I'm supposed to use cookieBehavior to tell the distro what cookies to send, rather than including "Cookies" as a header to send.
With |
When I did a cross-origin WSS request to wss://d2mrfshv1ypexe.cloudfront.net/ws/, it didn't include the cookies for d2mrfshv1ypexe.cloudfront.net. This makes sense given my cookies are all |
TODO
|
gh-250 For some reason that is very hard to Google for, when I had {window.location.origin} in the JSX that I'm changing here, it put a comma before and after the string!
gh-250 The handlers need to authenticate the connection requests and associate Connection IDs to Room Codes.
gh-250 I'm not finding the cookies
gh-250 I'm not giving write access for now, because I want to avoid an infinite loop situation if I accidentally write to the db from the stream handler.
gh-250 I can still see it there in the console, and my stream handler still fails with a message about the endpoint.
gh-250 Incredibly, a replace() function that works from the Node REPL won't trim wss:// from the start of my endpoint.
gh-250 Considering listeners and edge cases, it's getting too confusing for a parent component (App) to pass a stateful WebSocket to pages.
gh-250 The first participant (the leader) was getting displayed twice.
gh-250 I don't know the room code when I get a disconnect event.
Use WebSockets.
The text was updated successfully, but these errors were encountered: