Skip to content

feat: implement SSE real-time streaming for simulations - #107

Open
Sanan507 wants to merge 1 commit into
masterfrom
jules/issue-90-sse-streaming-3411215096698983024
Open

feat: implement SSE real-time streaming for simulations#107
Sanan507 wants to merge 1 commit into
masterfrom
jules/issue-90-sse-streaming-3411215096698983024

Conversation

@Sanan507

Copy link
Copy Markdown
Owner

Closes #90

This PR implements Server-Sent Events (SSE) streaming for algorithm simulations to improve real-time playback and handle large datasets without blocking.

Changes

  • Backend: Added StreamController and StreamingService using Spring's SseEmitter. Algorithm execution is offloaded to a managed thread pool that emits frames iteratively as they are computed.
  • Frontend: Created sseClient.ts to handle EventSource logic and query parameter mapping for grid matrices. Refactored SortingPage, SearchingPage, and PathfindingPage to use the stream, appending incoming frames incrementally to the component state without overwriting.

Tested locally using mvn test, pnpm test, and pnpm run build to ensure there are no regressions or syntax errors.


PR created automatically by Jules for task 3411215096698983024 started by @Sanan507

…hm simulations

- Add `StreamingService` to manage Server-Sent Events (SSE) emitting for Sorting, Searching, and Pathfinding
- Use a gracefully shutdown cached thread pool in `StreamingService` to compute frames asynchronously
- Create `StreamController` to expose GET endpoints returning `SseEmitter`
- Add `sseClient.ts` to manage EventSource connections in the frontend
- Update `SortingPage`, `SearchingPage`, and `PathfindingPage` to receive real-time streams instead of waiting for the full simulation payload
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
algorithm-race-visualizer Ready Ready Preview Aug 10, 2026 5:46am

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

Successfully merging this pull request may close these issues.

feat(backend): Server-Sent Events (SSE) Live Frame Streaming Engine

1 participant