Regarding WebSocket support addition to DevTools project Idea

85 views
Skip to first unread message

Divyansh Singh

unread,
Feb 20, 2026, 2:27:22 AMFeb 20
to dart-gsoc
Hello,

I was working on the sample project ProfileableWebSocket and I have to decide which approach to this would be the best. I would also like to disclose that some approaches were suggested by an LLM.

1. I looked at the HttpProfile code which used a decorator pattern, similarly here the class would be an implementation of WebSocket where I would only care about the methods needed like add() and listen() and record a "SocketEvent". This approach is pretty verbose.

2. [LLM suggested] Using StreamView, which will automatically handle all the other methods without us having to override them ourselves.

3. [LLM suggested] Using a StreamController, recording the events and pushing data into our own controller for the user to listen.

Would love to know what are the tradeoffs here and help me decide on the approach to take, Thanks!

Elliott Brooks

unread,
Feb 23, 2026, 6:04:30 PMFeb 23
to dart-gsoc

Thank you for reaching out! I'm replying to the public group as well so this is information is findable by other applicants.


Part of the goal of the starter project is to evaluate applicants' design decisions, so unfortunately I can't tell you which of the approaches you've outlined is the right one. But here's a hint: as you consider the differences and trade-offs between them, keep in mind that a key characteristic of Dart's WebSocket is that it implements both Stream and StreamSink


Hope this helps!

Elliott

Reply all
Reply to author
Forward
0 new messages