I think it is important that I dwell on where I come from, so that you can understand my precedent, please carry me.
Reference Information. I want to redirect my application from CouchDB 1 to 2, and this migration will take a decent amount of work. I just want to double check that Im is not reinventing the wheel and not making sure that there is no better design, which I will discuss below, especially since CouchDB 2 has some awesome new features.
Consider the following simplified example of using an application that allows students to send answers to quizzes in digital form. Each student should be able to submit their answers to the quiz, and the teacher should be able to view all the answers. This project should work with PouchDB, because PouchDB speaks directly to the database, and this saves us a lot of time, because otherwise you will need to write a complex set of APIs.
My selected project consists of one database for each student and one database for each teacher, i.e. Databases for each user. Only the database owner can edit their database, and this is achieved using the CouchDB roles. When a student sends a response, he synchronizes with his / her database through PouchDB. Then the answers are duplicated in the database of teachers. This, in turn, allows students to quickly download answers in the app and teachers to download all answers for all of their students. Of course, in the teacher’s databases there are opinions that separate the answers by class, quiz, etc., so the teacher should not immediately download the answers for all of his students. If we didn’t have a teacher database,the teacher would need access to all the databases of students and he would have to synchronize with all the databases of his students.
_replicator . , , , . , 10 000 , 10 000 . , , 100 10 000 .
, _db_updates . , , .
Ive CouchDB 2, , _replicator , CouchDB 1.
? , , ?