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

Asynchronous imports #46

Open
nilshoerrmann opened this issue Jul 30, 2015 · 1 comment
Open

Asynchronous imports #46

nilshoerrmann opened this issue Jul 30, 2015 · 1 comment

Comments

@nilshoerrmann
Copy link
Contributor

As mentioned in #45, we are synchronising Symphony with a large product database containing a few thousand items. Running the importer will freeze the backend for quite some time so I thought about asynchronous imports:

  • Running an importer will make a AJAX request to the server initialising the import.
  • This background import will write the import stats (the count of imported entries and the count of all entries) to disk as well as the final status report.
  • A web worker is used to dynamically show the import progress and the final status report.

Handling the import asynchronously and writing the status report to disk would make the latest import results available to the user even if he left the page to check back later. It would also make it possible to revise reports for automated imports invoked by cron jobs.

As usual, comments by @brendo are very welcome.

@nitriques
Copy link
Member

A web worker is used to dynamically show the import progress and the final status report.

This is hard to do since web workers do not have access to the DOM and everything would need to get sent via message passing.

I would rather use ajax polling... Much simpler to code and maintain.

The overall, very good idea.

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

No branches or pull requests

2 participants