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

Move find and replace into task queue, send progress updates via websockets #29

Open
wants to merge 43 commits into
base: main
Choose a base branch
from

Conversation

cubeghost
Copy link
Owner

@cubeghost cubeghost commented Dec 30, 2021

Problems this hopes to solve:

The idea:

  • Use a task queue for find and replace operations (trying BullMQ)
  • Emit data events every time we get a page of results and send those back to the client using websockets
  • Move pagination loop out of TumblrClient and into workers, allowing for more exact rate limiting
  • Probably use the client-persisted results of find to queue the replace jobs, instead of running find again like we do now
Early draft of system diagram it's close enough

Stuff that ended up happening too:

  • Getting rid of class components and HOCs (it's 2022 2023 2024)
  • I want to try using Redux Toolkit so that's in the mix
  • Developed a mental block around the state design and tried designing a new frontend to get out of it
  • Still had a mental block so I forgot about this for like a year

EqlPkQjWMAErPh7

@cubeghost cubeghost added the wip label Dec 30, 2021
@cubeghost cubeghost linked an issue Dec 31, 2021 that may be closed by this pull request
@cubeghost
Copy link
Owner Author

one big issue currently is the websocket message queue is keyed to the user session, if a user has multiple tabs of the tag replacer open, the websocket messages end up splitting between them kind of randomly(?). we need to either share the entire app state between tabs (a la service workers) or have unique message queues per "tab session"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Large Tagset Issues - Feature Request + Bug Report
1 participant