Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Real-Time Coverage WebSocket Push Feature #31

Open
zhangtao25 opened this issue Jan 19, 2025 · 0 comments
Open

Real-Time Coverage WebSocket Push Feature #31

zhangtao25 opened this issue Jan 19, 2025 · 0 comments

Comments

@zhangtao25
Copy link
Contributor

zhangtao25 commented Jan 19, 2025

Description:

I would like to propose adding a real-time coverage WebSocket push feature to Canyon.

Overview:

The idea is to enable real-time coverage data updates for applications connected to the server. This would work as follows:

  1. When an application connects to the server, the server pushes the current coverage data for that application in real-time via WebSocket.
  2. A dedicated web page will be provided to display the real-time coverage data for connected applications.

Benefits:

  • Provides immediate visibility into coverage changes during runtime.
  • Facilitates debugging and analysis for developers by showing real-time metrics.

Suggested Implementation:

  1. WebSocket Server:

    • Add WebSocket endpoints to the backend service (canyon-backend) to handle connections and push coverage updates.
    • Ensure the connection is associated with the correct application context.
  2. Real-Time Coverage Updates:

    • Trigger WebSocket messages whenever there are updates in the coverage data (e.g., new reports received, changes processed).
    • Optimize data format for minimal bandwidth usage.
  3. Web UI:

    • Create a new page or module in canyon-platform for visualizing real-time coverage data.
    • Include key metrics (e.g., percentage coverage, number of hits, module-level breakdown) and update the view dynamically.
  4. Security:

    • Add authentication and authorization mechanisms to ensure only authorized users can connect and view data for a specific application.

Potential Challenges:

  • Managing high-frequency updates for large applications with extensive coverage data.
  • Ensuring scalability when multiple applications are connected simultaneously.

References:

WebSocket Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API)

@zhangtao25 zhangtao25 pinned this issue Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant