The goal of this endpoint is to give SonarQube the possibility to push events to Sonarlint clients, to notify them about a change without delay. The solution is to use Server Side Event (SSE) over http1. Sonarlint clients will subscribe to events for a list of project keys & languages, the server should send an event when needed (see
SONAR-15919 and SONAR-15920 as the first two events to be implemented)
The endpoint should be flagged as internal.
every 10s, the server will push a small payload to verify that the connexion is still alive. Any exception raised by this heartbeat will terminate the connexion on the server side.
The endpoint should support all current authentication mechanisms: JWT token, username:password, SQ token.
Browse permission is required on all projects in the "projectKeys" parameter.
Each Web node holds a local collection of Sonarlint Clients that are registered on this node (should be balanced by the load balancer). When an event is broadcast to SL clients, it's also sent to all SQ Web nodes through Hazelcast, allowing them to broadcast the event to their SL clients.
Code design and packaging:
This new endpoint and the related code should be placed in a dedicated module for ServerSide Event. It should be available starting from Community Edition, meaning it's open source.