Answer the question
In order to leave comments, you need to log in
What is an effective way to implement delayed publication of posts?
Hello.
I'm building a small API server on Node, Express, Mongo. There was a question how it is better to organize the delayed publication?
For example, I'm creating an Article document, and I don't want it to be used immediately by the application, but when I specify it.
What is the best way to do this so that there are no unnecessary checks, queries, filtering, etc.?
The first thing on your mind is to specify the PublishAt field and indicate the time there, but then the server will have to check each post once more before sending it to the client. And if there are 100 such posts and 1000 visitors? Caching and so on seems to be understandable, but how to implement everything correctly from the very beginning?
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