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

syncing does not seem to end #159

Open
mensch72 opened this issue Jul 4, 2022 · 5 comments
Open

syncing does not seem to end #159

mensch72 opened this issue Jul 4, 2022 · 5 comments
Assignees
Labels
bug Something isn't working hacktoberfest

Comments

@mensch72
Copy link
Collaborator

mensch72 commented Jul 4, 2022

sometimes on the poll page the spinner does not stop

@mensch72 mensch72 added the bug Something isn't working label Jul 4, 2022
@mensch72 mensch72 self-assigned this Jul 4, 2022
@mensch72
Copy link
Collaborator Author

mensch72 commented Jul 4, 2022

sometimes the sync also seems to get stuck and only proceed when reloading

@asumandang
Copy link
Contributor

Hello @mensch72 ! Can you provide me more details about this? I couldn't replicate this on my end.

@mensch72
Copy link
Collaborator Author

mensch72 commented Oct 4, 2023

Hi again, @asumandang . This is probably a tougher one, likely related to other syncing issues, like #161 and #162.

I did not find a reliable way to reproduce these issues, since they seem to appear only irregularly, and in complex situations. I believe they mainly appear when there is quite some traffic between CouchDB and devices going on. It might also be caused by some user using vodle on two different devices.

Originally, I tried to design the whole data storage and syncing scheme so that the high-level TS code can work with class properties without having to care about storage and syncing. In the entity classes (e.g., Poll in poll.service.ts), these properties then make use of getter and setter methods (e.g. getp, setp for poll-specific data items) provided by data.service.ts. These methods and their submethods (e.g. _setp_in_userdb, store_user_data, etc.) then get/set the values both in one of several caches (for faster get access, e.g. with user_cache) and in one of several local PouchDBs (e.g. local_synced_user_db). Finally, these PouchDBs are set up to automatically sync with the remote CouchDB (e.g., remote_user_db).

I fear now that this architecture might be overly complex and hard to debug. I am a little at a loss how to improve the situation without refactoring the whole data management...

@asumandang
Copy link
Contributor

If I can replicate it on my end, then I'll probably try to take this issue. I'll let you know if I can but for now, I won't be able to take this issue 😅

In case someone else wants to take this on.

@mensch72
Copy link
Collaborator Author

mensch72 commented Oct 4, 2023

Sure!

It would help a lot already if someone with good data management experience would do a code review of data.service.ts and comment on things that seem fishy or might be improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants