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

Pubsub should automatically keep in sync with state.contracts #298

Closed
taoeffect opened this issue Aug 13, 2017 · 0 comments
Closed

Pubsub should automatically keep in sync with state.contracts #298

taoeffect opened this issue Aug 13, 2017 · 0 comments
Assignees
Labels
App:Frontend Kind:Core Anything that changes or affects the fundamental core data structures & design of the application. Priority:High

Comments

@taoeffect
Copy link
Member

taoeffect commented Aug 13, 2017

Problem

From "Notes" in #257 comment:

In order to make the "revert vuex state" stuff work correctly, we need to tie the Pubsub to the vuex state by having the Pubsub maintain a list of websockets it has open, and have the vuex store also contain this same list in it under a key called "pubsub". Then have the Pubsub watch the vuex store for any modifications to that key. For example, if the vuex "pubsub" key has 1 item in it that the Pubsub list does not, then the Pubsub takes that to mean that it should open a websocket connection. If the vuex list does not have an item that the Pubsub does have, then the Pubsub takes that to mean it should unsubscribe/close the websocket.

Solution

Per above pubsub keep its own array/map of rooms and monitor state.contracts for changes, making sure to join/leave as appropriate.

Might be worth introducing #295 with this.

@taoeffect taoeffect added App:Frontend Kind:Core Anything that changes or affects the fundamental core data structures & design of the application. Priority:High labels Aug 13, 2017
@taoeffect taoeffect changed the title backend (pubsub) system should automatically keep in sync with state.contracts Pubsub should automatically keep in sync with state.contracts Aug 13, 2017
@taoeffect taoeffect mentioned this issue Aug 13, 2017
@taoeffect taoeffect self-assigned this Aug 14, 2017
taoeffect added a commit to taoeffect/group-income-simple that referenced this issue Aug 17, 2017
+ Pubsub sync. Closes okTurtles#298
+ Basic SBL implementation + usage! :D
+ Improvements to SignUp.vue implementation
taoeffect added a commit to taoeffect/group-income-simple that referenced this issue Aug 17, 2017
+ Pubsub sync. Closes okTurtles#298
+ Basic SBL implementation + usage! :D
+ Improvements to SignUp.vue implementation
taoeffect added a commit to taoeffect/group-income-simple that referenced this issue Aug 17, 2017
+ Pubsub sync. Closes okTurtles#298
+ Basic SBL implementation + usage! :D
+ Improvements to SignUp.vue implementation
taoeffect added a commit to taoeffect/group-income-simple that referenced this issue Aug 17, 2017
+ Pubsub sync. Closes okTurtles#298
+ Basic SBL implementation + usage! :D
+ Improvements to SignUp.vue implementation
taoeffect added a commit to taoeffect/group-income-simple that referenced this issue Aug 17, 2017
+ Pubsub sync. Closes okTurtles#298
+ Basic SBL implementation + usage! :D
+ Improvements to SignUp.vue implementation
taoeffect added a commit to taoeffect/group-income-simple that referenced this issue Aug 23, 2017
+ Pubsub sync. Closes okTurtles#298
+ Basic SBL implementation + usage! :D
+ Improvements to SignUp.vue implementation
taoeffect added a commit to taoeffect/group-income-simple that referenced this issue Aug 23, 2017
+ Pubsub sync. Closes okTurtles#298
+ Basic SBL implementation + usage! :D
+ Improvements to SignUp.vue implementation
taoeffect added a commit to taoeffect/group-income-simple that referenced this issue Aug 23, 2017
+ Pubsub sync. Closes okTurtles#298
+ Basic SBL implementation + usage! :D
+ Improvements to SignUp.vue implementation
taoeffect added a commit to taoeffect/group-income-simple that referenced this issue Aug 23, 2017
+ Pubsub sync. Closes okTurtles#298
+ Basic SBL implementation + usage! :D
+ Improvements to SignUp.vue implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App:Frontend Kind:Core Anything that changes or affects the fundamental core data structures & design of the application. Priority:High
Projects
None yet
Development

No branches or pull requests

1 participant