Answer the question
In order to leave comments, you need to log in
The right architectural solution?
And so I have a chat.
Its business logic consists of two collections in MongoDB, viz.
Chanel
chat rooms :
- User
- Name
- _id
Messages in the rooms
Message:
- DialogId
//and there are other fields
The resulting dialog DialogId is the ObjectId of the Chanel document. And then the question arose that I need to delete all the Message collections in mongo if the dialog is deleted.
But I don’t know how to do this correctly, since on one side the event loop will block for me. And on the other, conditional 10 thousand deletion operations in mongo.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question