lenra-io / server

GNU Affero General Public License v3.0
6 stars 0 forks source link

[Task] Implement `insertMany` in mongo doc creation. #504

Closed jonas-martinez closed 8 months ago

jonas-martinez commented 10 months ago

What should be done

Linked to https://github.com/lenra-io/server/issues/574 To solve some performance issues we might find useful to implement the insertMany for mongo document creation which will help reduce the number of requests between the app, the server and the DB. I don't think that I need to explain why so if anyone needs more detail, I will take the time to add some.

Technical recommandation

It is possible that the server will undergo a power spike when trying to insert a very large amount of documents at once using this feature. The network might also be an issue. We might want to apply a maximum size for the data sent by the app.

Ecological concerns

This is good for ecological reasons because it reduces the number of requests between the app and the server.

Is this task linked with any other ?

https://github.com/lenra-io/server/issues/574

taorepoara commented 10 months ago

Don't forget to add it to the API project and update the app-lib projects