Performance: Why notifications reach users effectively
MEDIUM IMPACT
This concept affects how quickly and reliably notifications appear to users, impacting perceived responsiveness and engagement.
dispatch(function () use ($users, $message) { Notification::send($users, new NewMessageNotification($message)); })->delay(now()->addSeconds(1)); // queued notificationNotification::send($users, new NewMessageNotification($message)); // synchronous sending inside controller
| Pattern | Server Processing | Response Delay | User Interaction Delay | Verdict |
|---|---|---|---|---|
| Synchronous notification sending | High CPU and I/O during request | Blocks response until complete | Delays user interaction | [X] Bad |
| Queued asynchronous notification sending | Offloaded to queue workers | Immediate response to client | Minimal delay in interaction | [OK] Good |