Answer the question
In order to leave comments, you need to log in
What are the options for distributing messages to users?
Hello, I am doing a service for exchanging likes.
The user of the service can create a task "put 10 likes here". Other users should be able to request available tasks, where the response will be "like here".
After completing the task, the user sends a request that he completed the task.
It is necessary that they do not complete the task more than necessary.
I came up with this model.
1) the task "put 10 likes here" comes
2) the server creates 10 tasks in the queue "put like here"
3) the user makes a request "give a task" - we check the history that he did not do this task and give him a task from the queue, and we hide it in the queue so that others do not take it again.
4) when the user finishes the task, he sends a request for the fact that he did it and after checking the task is removed from the queue.
If he did not complete it, then we return the task to the queue.
In fact, the bass service is ideal, but it does not have the "Read" method, there is only a subscription to the message receipt event, and this is not suitable for the API, what can you think of?
I really don’t want to do all this in the database because there will be a lot of tasks and managing the states is a rather difficult task.
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