Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Reverb Laravel Package

laravel/reverb

Laravel Reverb adds real-time WebSocket support to Laravel applications, enabling event broadcasting and live updates via a first-party server. Designed to integrate with Laravel’s broadcasting features for fast, reliable real-time communication.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Real-time features roadmap: Enables live updates (e.g., notifications, chat, collaborative tools) without third-party dependencies like Pusher or Ably.
  • Cost optimization: Replaces paid WebSocket services (e.g., Pusher, Socket.io) for high-scale apps, reducing infrastructure costs.
  • Build vs. buy: Build—avoids vendor lock-in while leveraging Laravel’s ecosystem (e.g., broadcasting, channels).
  • Use cases:
    • Collaborative apps (e.g., live document editing, whiteboards).
    • Notifications (e.g., real-time alerts, activity feeds).
    • Gaming (e.g., multiplayer interactions, turn-based games).
    • Dashboards (e.g., live metrics, stock tickers).
    • Chat apps (e.g., 1:1 or group messaging with presence tracking).
  • Scalability: Supports horizontal scaling via Redis pub/sub and connection limits.
  • Security: Built-in rate limiting, auth signature verification, and CORS controls.
  • Monetization: Enables real-time features for SaaS products (e.g., team collaboration tools, live support).

When to Consider This Package

Adopt if:

  • Your app is Laravel-based and needs real-time WebSocket functionality.
  • You want to avoid third-party SaaS costs (e.g., Pusher, Ably) for high-traffic apps.
  • Your use case fits Laravel’s broadcasting system (e.g., channels, events, presence).
  • You need scalability (Redis-backed, supports clustering).
  • Your team has PHP/Laravel expertise (lower learning curve than custom WebSocket servers).

Look elsewhere if:

  • You need cross-language support (e.g., Node.js, Python clients)—Reverb is PHP-first.
  • Your app requires low-latency (<50ms) for high-frequency trading or gaming (consider raw WebSocket libraries like Ratchet).
  • You lack Redis infrastructure (Reverb relies on Redis for pub/sub).
  • You need advanced WebSocket protocols (e.g., STOMP, MQTT)—Reverb is Pusher-compatible but not protocol-agnostic.
  • Your team prefers managed services (e.g., Firebase, AWS AppSync) for simplicity.

How to Pitch It (Stakeholders)

For Executives: "Laravel Reverb lets us replace Pusher/Ably with a self-hosted, cost-effective WebSocket backend—cutting cloud fees by ~$X/year while maintaining scalability. It’s battle-tested (used by Laravel’s own ecosystem), supports real-time features like chat and live updates, and integrates seamlessly with our existing Laravel stack. Risk is low: it’s MIT-licensed, actively maintained, and reduces vendor lock-in."

For Engineering: *"Reverb gives us a drop-in replacement for Pusher with Laravel’s broadcasting system. Key benefits:

  • Performance: Optimized for Laravel (e.g., O(1) pub/sub, connection limits).
  • Flexibility: Custom channels, presence tracking, and auth via Laravel’s ecosystem.
  • Scalability: Redis-backed, supports horizontal scaling with minimal config.
  • Cost: No per-message fees—just self-hosted Redis.
  • Tooling: Built-in CLI (reverb:reload), rate limiting, and Pusher-compatible API. Tradeoff: Requires Redis, but we already use it for caching/sessions. Migration is straightforward if we’re using Laravel Echo."*

For Developers: *"Reverb lets you use Laravel’s broadcast() methods with WebSockets—no need to learn raw WebSocket libraries. Example:

// Broadcast to a channel
Broadcast::channel('chat.{room}', function ($user, $room) {
    return ['id' => $user->id];
})->to($room);

// Send a message
Broadcast::to('chat.123')->send(new ChatMessageEvent('Hello!'));

It handles:

  • Presence (track who’s online in a channel).
  • Auth (Laravel middleware for WebSocket connections).
  • Scaling (Redis pub/sub for distributed setups). Pro tip: Use reverb:reload to restart the server without downtime."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codraw/framework-extra-bundle
codraw/messenger
codraw/security
codraw/mailer
codraw/contracts
codraw/profiling
codraw/dependency-injection
codraw/tester
codraw/core
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony