I'm working in a company that has a driver management product. To deliver purchases there is a job in the current system that sends notifications to couriers, stating there is a new purchase to be delivered to the destination X.

The same delivery person can receive this notification twice. Among other business rules, one of them is that the order can only be notified to one person at a time, and this driver has a period of 20 seconds to accept or refuse the delivery order. There are rules, if the couriers refuse the order, it enters a list of available orders that any courier can accept, anyway.

As the company is going through a big growth phase, I'm studying ways to improve this process. One of them is a way to run this job in N pods in Kubernetes. The problem is, I can't imagine how to 'orchestrate' this process running on N servers.

The biggest problem, in my view, would be this last point I highlighted: that the order can only be notified to one delivery person at a time, this notification is sent to the delivery person's cell phone, using an action in SignalR. For this new system , I plan to use MQTT, to get better this flow control.

So my question is, what is the best way to manage this notification flow? One of the studies I did was with the actor programming model, but I couldn't correctly define the actors' actions.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.