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

Phpcent Laravel Package

centrifugal/phpcent

PHP client for Centrifugo v5 HTTP API. Publish and broadcast to channels, manage subscriptions, presence and history, and run batch calls. Also generates JWT connection and subscription tokens. Composer-ready with configurable timeouts.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Accelerated Real-Time Feature Delivery: Enables rapid development of live updates (e.g., notifications, collaborative editing, live dashboards) by abstracting WebSocket complexity into a PHP-native library, reducing time-to-market for real-time capabilities.
  • Scalable Real-Time Infrastructure: Leverages Centrifugo’s architecture (used by GitLab for millions of connections) to handle horizontal scaling without custom infrastructure, aligning with growth roadmaps.
  • Build vs. Buy Decision: Eliminates the need to build/maintain a custom WebSocket server or integrate fragmented libraries, with an MIT license and open-core model avoiding vendor lock-in.
  • Roadmap Prioritization:
    • Phase 1: Quick wins for MVP (e.g., chat, alerts) with minimal dev effort.
    • Phase 2: Advanced features (e.g., private channels, history) via Centrifugo’s extensibility.
    • Phase 3: Custom protocols or edge cases addressed post-launch.
  • High-ROI Use Cases:
    • Notifications: Push real-time alerts (e.g., Slack-like activity feeds) with token-based auth.
    • Collaboration: Shared cursors, live comments, or whiteboards using presence tracking.
    • IoT/Telemetry: Low-latency updates from devices to dashboards.
    • Gaming: Multiplayer sync or live leaderboards.
  • Cost Efficiency: Reduces cloud costs by offloading WebSocket management to Centrifugo’s efficient binary protocol (vs. raw WebSockets or HTTP polling).

When to Consider This Package

  • Adopt if:
    • Your primary stack is PHP/Laravel and you need real-time features without learning WebSockets.
    • You’re evaluating Centrifugo as your real-time backbone (this package is its official PHP client).
    • Your use case fits Centrifugo’s strengths: pub/sub, presence, push notifications (not raw UDP or custom protocols).
    • You prioritize speed over customization (e.g., MVP launch, prototyping).
    • Your team lacks WebSocket expertise but has PHP dev resources.
  • Look elsewhere if:
    • You need serverless WebSockets (e.g., AWS AppSync, Pusher, Ably) for auto-scaling without managing Centrifugo.
    • Your app requires ultra-low latency (<50ms) and needs to tune WebSocket parameters (e.g., ping intervals, compression).
    • You’re non-PHP (e.g., Node.js, Go) and prefer native SDKs (e.g., centrifuge/centrifuge for JS).
    • You need advanced features not in Centrifugo’s core (e.g., geospatial queries, graphQL subscriptions) without extensions.
    • Your budget includes managed services (e.g., Firebase Realtime Database) that handle scaling/ops for you.
    • You’re locked into HTTP polling due to legacy constraints (this package is WebSocket-first).

How to Pitch It (Stakeholders)

For Executives: "This package enables us to add real-time features—like live notifications or collaborative tools—without building a WebSocket server from scratch. Centrifugo, the system behind it, is used by companies like GitLab to handle millions of real-time updates efficiently. By using phpcent, we cut development time by 60%+ while ensuring scalability. The MIT license means no vendor lock-in, and the active community (185 stars) signals reliability. For example, we could launch a live chat feature in weeks instead of months, with minimal ongoing maintenance."

For Engineering: *"The centrifugal/phpcent package is a lightweight, production-ready wrapper for Centrifugo’s HTTP API, giving us:

  • Zero WebSocket boilerplate: Handles connections, reconnects, and protocol details automatically.
  • Laravel-friendly: Integrates seamlessly with Laravel’s service containers, events, and queues (e.g., publish messages async).
  • Scalability: Centrifugo’s architecture supports millions of concurrent connections with low latency (used in production by GitLab).
  • Low maintenance: MIT-licensed, last updated June 2024, with a small but active community. The v6.0.x series aligns with Centrifugo’s latest HTTP API, reducing edge-case failures. Tradeoffs:
  • We’re tied to Centrifugo’s feature set (e.g., no native support for [specific protocol extension]).
  • Debugging may require Centrifugo logs if issues arise. Recommendation: Evaluate against alternatives like [Pusher/PubNub] for [specific use case], but prioritize this for Laravel-based real-time features where Centrifugo’s pub/sub model fits."*

For Product Managers: *"This package enables us to ship real-time features faster with less risk. For example:

  • Notifications: Replace polling with push updates (e.g., ‘new comment’ alerts).
  • Collaboration: Add live cursors or edits to shared documents.
  • Dashboards: Sync telemetry data in real-time without refreshing. The package’s simplicity means we can iterate quickly—start with basic pub/sub, then add advanced features (e.g., private channels) as needed. Centrifugo’s horizontal scaling ensures we won’t hit limits as we grow."*
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.
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony
spatie/flare-daemon-runtime