# Real-time & WebSockets (Symfony) > Mercure, WebSockets, Server-Sent Events, notificações push, atualizações em tempo real - 18 perguntas de entrevista - Senior - [Perguntas de entrevista: Symfony](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista.md) ## 1. Qual é o protocolo recomendado pelo Symfony para implementar funcionalidades em tempo real? **Resposta** Mercure é o protocolo oficialmente recomendado pelo Symfony para funcionalidades em tempo real. Desenvolvido por Kévin Dunglas (criador do API Platform), o Mercure é baseado em Server-Sent Events (SSE) e oferece integração nativa com o Symfony por meio do bundle symfony/mercure. Ele permite uma comunicação unidirecional servidor-para-cliente eficiente com reconexão automática. ## 2. Qual é a principal diferença entre WebSockets e Server-Sent Events (SSE)? **Resposta** Os WebSockets estabelecem uma conexão bidirecional full-duplex que permite tanto ao cliente quanto ao servidor enviar mensagens a qualquer momento. O SSE é unidirecional: apenas o servidor pode enviar dados ao cliente. O SSE usa HTTP padrão (mais fácil de implantar atrás de proxies), enquanto os WebSockets usam um protocolo distinto após o handshake inicial. ## 3. Qual bundle do Symfony permite integrar o Mercure em uma aplicação? **Resposta** O bundle symfony/mercure-bundle fornece a integração oficial do Mercure com o Symfony. Ele configura automaticamente o serviço HubInterface para publicar updates e gera as URLs de inscrição. O bundle é instalado via Composer e requer um hub Mercure externo (Caddy com o módulo Mercure ou o binário Mercure standalone). ## Mais 15 perguntas disponiveis - Como publicar uma mensagem em um topic do Mercure a partir de um controller do Symfony? - Qual é a função do JWT na autenticação do Mercure para topics privados? Cadastre-se gratis: https://sharpskill.dev/pt/login ## Outros temas de entrevista Symfony - [PHP Moderno (8.1+)](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/php-modern-features.md): 20 perguntas, Junior - [Fundamentos do Symfony](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/symfony-basics.md): 25 perguntas, Junior - [Routing & Controllers](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/routing-controllers.md): 20 perguntas, Junior - [Twig & Templates](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/twig-templates.md): 20 perguntas, Junior - [Fundamentos do Doctrine ORM](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/doctrine-orm-basics.md): 25 perguntas, Junior - [Formulários Symfony](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/forms.md): 22 perguntas, Junior - [Validação de dados](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/validation.md): 18 perguntas, Junior - [Dependency Injection & Services](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/dependency-injection.md): 24 perguntas, Mid-Level - [Security & Authentication](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/security-authentication.md): 26 perguntas, Mid-Level - [Doctrine avançado](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/doctrine-advanced.md): 24 perguntas, Mid-Level - [API Platform](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/api-platform.md): 22 perguntas, Mid-Level - [Serializer Component](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/serializer.md): 20 perguntas, Mid-Level - [Events & Event Subscribers](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/events-subscribers.md): 20 perguntas, Mid-Level - [Console & Commands](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/console-commands.md): 18 perguntas, Mid-Level - [Messenger Component](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/messenger.md): 22 perguntas, Mid-Level - [HTTP Client](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/http-client.md): 18 perguntas, Mid-Level - [Cache e Desempenho](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/cache.md): 20 perguntas, Mid-Level - [Workflow Component](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/workflow.md): 18 perguntas, Mid-Level - [Testing Symfony](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/testing.md): 22 perguntas, Mid-Level - [Mailer Component](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/mailer.md): 16 perguntas, Mid-Level - [Traduções e i18n](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/translations.md): 16 perguntas, Mid-Level - [EasyAdmin Bundle](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/easyadmin.md): 18 perguntas, Mid-Level - [Arquitetura Symfony](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/architecture-patterns.md): 24 perguntas, Senior - [Desempenho e otimização](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/performance-optimization.md): 22 perguntas, Senior - [Segurança avançada](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/security-advanced.md): 22 perguntas, Senior - [Bundles Personalizados](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/custom-bundles.md): 20 perguntas, Senior - [Microservices com Symfony](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/microservices.md): 22 perguntas, Senior - [Deployment & DevOps](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/deployment-devops.md): 20 perguntas, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/real-time