Node.js
Avancé
Building a WebSocket server for real-time notifications

Type d'évaluation

Mise en situation réelle

Analyse

Intelligence Artificielle

Compétences ciblées

nodejs
websocket
real-time
notifications
ws

Scénario Technique

Context A dashboard application polls the server every 5 seconds for new notifications, generating unnecessary traffic when nothing has changed. The Problem HTTP polling creates constant load and introduces up to 5 seconds of notification latency. Constraints Implement a WebSocket server using the ws library. Push notifications to connected clients when an event occurs. Manage client connections in a Map keyed by user ID. Handle client disconnection and reconnection gracefully. Expected Deliverable A Node.js WebSocket server pushing targeted real-time notifications to connected clients by user ID, with connection lifecycle management.

Prêt à évaluer ce talent ?

Accédez à l'interface de test complète pour soumettre votre architecture ou votre code.

Commencer le Défis