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

Websocket Laravel Package

phrity/websocket

PHP WebSocket client and multi-connection server with ws/wss support. Includes listener callbacks, standard Close and Ping/Pong handling, optional deflate compression, fragmentation and masking support, plus middleware system for extending behavior.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Real-time features: Enables low-latency, bidirectional communication for chat apps, live notifications, or collaborative tools (e.g., Google Docs-like editing).
  • Build vs. buy: Avoids reinventing WebSocket infrastructure; leverages a battle-tested, actively maintained PHP package instead of custom Node.js/Python solutions.
  • Roadmap alignment: Supports future-proofing for WebSocket v4 (deprecation warnings in v3.x) and PSR-17 compliance, reducing tech debt.
  • Use cases:
    • Client-side: Integrate with third-party WebSocket APIs (e.g., stock tickers, IoT dashboards).
    • Server-side: Build scalable real-time backends (e.g., multiplayer games, live analytics).
    • Hybrid: Combine with Laravel Echo/Pusher for fallback logic or custom protocols.

When to Consider This Package

  • Adopt if:

    • Your PHP stack (Laravel/Symfony) needs native WebSocket support without external services (e.g., Pusher, Ably).
    • You require custom middleware (e.g., compression, authentication, or protocol extensions).
    • Your team has PHP expertise and can maintain WebSocket logic in-house.
    • You need multi-connection handling (e.g., game lobbies, broadcast systems).
  • Look elsewhere if:

    • You’re using JavaScript-heavy stacks (e.g., Node.js with Socket.io) where PHP interop isn’t critical.
    • Your use case is simple pub/sub (consider Laravel’s built-in broadcasting with Redis).
    • You lack DevOps resources to manage persistent WebSocket servers (e.g., load balancing, SSL termination).
    • You need enterprise-grade SLA (e.g., 99.99% uptime); opt for managed services like Pusher or AWS API Gateway WebSockets.

How to Pitch It (Stakeholders)

For Executives: "This package lets us own our real-time infrastructure in PHP, reducing vendor lock-in and costs. For example, we can replace Pusher’s $500/month for 10K connections with a self-hosted Laravel server using this library—saving ~$60K/year while gaining full control. It’s production-ready (used in live systems like [example]) and aligns with our tech stack."

For Engineering: *"This is a drop-in replacement for abandoned textalk/websocket with modern features:

  • PSR-17 compliance (works with HTTP message factories).
  • Middleware ecosystem (compression, ping/pong, auth).
  • Server/client duality—build APIs or backends in one codebase.
  • Active maintenance (PHP 8.5+ support, v4 roadmap).

Trade-offs:

  • Requires PHP expertise (no JS devs needed).
  • Self-hosted = more ops overhead (but cheaper at scale).

Next steps:

  1. Spike: Benchmark against Pusher/Ably for our top use case (e.g., chat latency).
  2. Pilot: Replace one feature (e.g., notifications) with this library.
  3. Scale: Migrate remaining real-time features if TCO is positive."*
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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor