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

Goal 4 - The server maintains and returns a shared store of state (Redux). #8

Open
wants to merge 3 commits into
base: Goal-3
Choose a base branch
from

Conversation

deanrad
Copy link
Owner

@deanrad deanrad commented Dec 3, 2018

Prev | Next

In this goal, we'll address the issue of persistence. We notice its lack when we have late-joining clients. And we'll lay the foundations for persistence to a database. These will be server-only changes.

First we'll see that:

  • If a client joins after several others have sent holdRoom messages - the new client will not see the same rooms held as the others!

Then we'll make the following changes:

  • Create a Redux store in the server's memory
  • Respond to REST API calls with what's currently in the store
  • Filter incoming holdRoom actions through the store

We'll verify that:

  • Everything works, plus late-joining clients are in sync!

We've pretty much completed the app for demo purposes, and could call it done.
But, for one additional thing:

We now notice that:

  • Room 20 simulated occupancy changes are not reflected in late-joining clients

And so we'll:

  • Subscribe to simulated occupancy changes as well.

Then we'll really wonder if we want to use Redux in-memory or use a database. But we'll get the chance to add a database in the next Goal!

hotelcalifornia goal 4

Prev | Next

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.

None yet

1 participant