
Real-time & WebSockets
Mercure, WebSockets, Server-Sent Events, push notifications, real-time updates
1What is Symfony's recommended protocol for implementing real-time features?
What is Symfony's recommended protocol for implementing real-time features?
Câu trả lời
Mercure is Symfony's officially recommended protocol for real-time features. Developed by Kévin Dunglas (creator of API Platform), Mercure is based on Server-Sent Events (SSE) and offers native Symfony integration via the symfony/mercure bundle. It enables efficient server-to-client unidirectional communication with automatic reconnection.
2What is the main difference between WebSockets and Server-Sent Events (SSE)?
What is the main difference between WebSockets and Server-Sent Events (SSE)?
Câu trả lời
WebSockets establish a bidirectional full-duplex connection allowing both client and server to send messages at any time. SSE is unidirectional: only the server can send data to the client. SSE uses standard HTTP (easier to deploy behind proxies), while WebSockets use a distinct protocol after the initial handshake.
3Which Symfony bundle enables Mercure integration in an application?
Which Symfony bundle enables Mercure integration in an application?
Câu trả lời
The symfony/mercure-bundle provides official Mercure integration with Symfony. It automatically configures the HubInterface service for publishing updates and generates subscription URLs. The bundle is installed via Composer and requires an external Mercure hub (Caddy with Mercure module or standalone Mercure binary).
How to publish a message to a Mercure topic from a Symfony controller?
What is the purpose of JWT in Mercure authentication for private topics?
+15 câu hỏi phỏng vấn
Các chủ đề phỏng vấn Symfony khác
Modern PHP (8.1+)
Symfony Basics
Routing & Controllers
Twig & Templates
Doctrine ORM Basics
Symfony Forms
Data Validation
Dependency Injection & Services
Security & Authentication
Doctrine Advanced
API Platform
Serializer Component
Events & Event Subscribers
Console & Commands
Messenger Component
HTTP Client
Cache & Performance
Workflow Component
Testing Symfony
Mailer Component
Translations & i18n
EasyAdmin Bundle
Symfony Architecture
Performance & Optimization
Security Advanced
Custom Bundles
Microservices with Symfony
Deployment & DevOps
Nắm vững Symfony cho lần phỏng vấn tiếp theo
Truy cập tất cả câu hỏi, flashcards, bài kiểm tra kỹ thuật, bài tập code review và mô phỏng phỏng vấn.
Bắt đầu miễn phí