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

Rewrite the synchronization system #348

Open
lGuillaume124 opened this issue Sep 6, 2018 · 1 comment
Open

Rewrite the synchronization system #348

lGuillaume124 opened this issue Sep 6, 2018 · 1 comment
Assignees
Milestone

Comments

@lGuillaume124
Copy link
Contributor

The synchronization system must be rewritten according to the schema discussed in #345.

The process can be split into several methods in the PagesController controller, and match HTTP methods. For instance :

  • GET : return stats about the current status of the database, and about how many files can be imported, updated or removed
  • POST : trigger the import process (to add new tracks). Up to n tracks imported per request. The response code will be different depending on the result of the import
  • PATCH : trigger the update process (to update records from the database). They are edited because their related file on the filesystem has been modified since their last import. Up to n tracks updated per request. The response code will be different depending on the result of the process
  • DELETE : trigger the clean up process (to delete records from the database). They are considered as orphans because the file has been deleted from the filesystem

The requests must be stateless without any big transfer of data between the client and the server. No more potentially big sessions on server side, no more endless list of files on client side.

The process will be definitively far much longer than the previous versions, especially in case of tens of thousand files collections. But it should be easier to implement it through a CLI and add some automation capabilities.

The related view will be obviously changed too.

@lGuillaume124
Copy link
Contributor Author

The command-line tool must be refactored too.

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

No branches or pull requests

1 participant