Skip to content
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

Show new participants as they join #407

Merged
merged 61 commits into from
Apr 2, 2022
Merged

Show new participants as they join #407

merged 61 commits into from
Apr 2, 2022

Conversation

douglasnaphas
Copy link
Owner

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

According to

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.Lambda.BestPracticesWithDynamoDB.html

this is supposed to make more things happen in the initialization phase
of the function, thus potentially saving execution time.

I'm not sure if process.env.WS_ENDPOINT is available to initialization
code, or just handler code.
gh-250

It's settled:
process.env.ANY_ENVIRONMENT_VARIABLE_YOU_CAN_ACCESS_IN_THE_HANDLER is
available during Lambda Function initialization.
gh-250

See my comment here:

https://medium.com/@philipzeh/event-filtering-for-lambda-functions-using-aws-cdk-d332140590f8

I have no idea why I'm getting an error deploying the event mapping.
This commit is partially a guess that it has something to do with empty
lines (how does what I'm doing not satisfy the regex /.*/ ???), and
partially moving the event filters to separate files, so I can
pretty-format them automatically.
gh-250

I got an error:

Please ensure the role can perform the GetRecords, GetShardIterator,
DescribeStream, ListShards, and ListStreams Actions on your stream in
IAM.

https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-lambda-event-sources/lib/dynamodb.ts#L35
gh-250

Of course my attempt at using event source filtering resulting in no
events being processed. This will log the events to see if I have the
JSON structure wrong.
gh-250

Because I can't get my event filtering pattern to work, the Function
will handle everything from the stream, and filter within the Function
code.
gh-250

Also disconnect on App unload.
gh-250

If game names are URLs, for example, the two will behave differently.
gh-250

They behave differently if the game names are whole URIs. We want the
say encode/decodeURIComponent behaves, because the game names will come
across as query params and should be encoded as URI components
gh-250

This test is mostly a mess. It doesn't succeed or make much sense in its
attempt to mock the AWS SDK, and it breaks when I switch the AWS SDK
from require to import.
gh-250

This saves the connection Id in the db.
gh-250

The text is too pale to be readable in the secondary color.
gh-250

This test currently fails with the exact error I just got in the
deployed app.
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.
@douglasnaphas douglasnaphas merged commit 3626d25 into master Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant