Say there are two microservices (example is simplified)
PickupRequestService: lists pick-up requests of passengers
DriverService: drivers use to accept pickup requests
On a completely decoupled communication method (via message queues),
DriverService would make an async call to accept a pick-up request e.g.,
PickupRequestService->accept(pickupId). This looks fine however, for a few seconds, this will cause other drivers to see pick-up requests that are already taken.
You could probably eventually send a compensating failed message for those hopeful drivers that accepted a taken pick-up request e.g., "your request to accept the passenger has been rejected..." but that won't be a good UX.
My question is, for scenarios similar to this, where a state changing operation is time sensitive, is it okay to make synchronous inter-microservice REST calls? E.g.,
DriverService synchronously calls
PickupRequestService->accept(pickupId) so that the state change is instantaneous and no other driver sees old pick-up requests anymore.