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

Can app handle multiple users submission at the same time? #4

Open
xhdong-umd opened this issue Apr 9, 2018 · 1 comment
Open

Can app handle multiple users submission at the same time? #4

xhdong-umd opened this issue Apr 9, 2018 · 1 comment

Comments

@xhdong-umd
Copy link
Contributor

xhdong-umd commented Apr 9, 2018

I think the app will read/rewrite the bib data file when a user submitted data. What will happen if two users are submitting at the same time?

The first question is, do we want to update the database with user input immediately? If we do want that, we need to have some lock mechanism to prevent write at the same time.

Otherwise, I think one approach could be:

  • maintain a database file in a separate location
  • if it's OK for user to see the existing references database, we can also show it inside the app with shiny DT.
  • user submitted records will be shown inside app as a pending update, with records, user name and some note field. This is also a good place to include the user note for each record if needed. The actual data can be saved as a csv file in a folder. So each user submission will create a file in that folder.
  • you can run a maintenance script to try to merge user submission with database from time to time, and only update the database when there is no error. This can be an automated job, and there will not be simultaneous write.
@jmcalabrese
Copy link
Owner

I think I will probably switch to each ref being written to a separate file with a unique file name, instead of everything going in the same file. That should prevent any issues with records being overwritten. I want to keep the interface as simple and clean as possible, so I'm not keen on displaying all records that have already been submitted. It's easy enough to merge duplicate records at import time, so I'm not worried about that.

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