Skip to content

feat(fdc): Streaming implementation for data connect#18174

Merged
Lyokone merged 15 commits intomainfrom
ap/pasta
Apr 13, 2026
Merged

feat(fdc): Streaming implementation for data connect#18174
Lyokone merged 15 commits intomainfrom
ap/pasta

Conversation

@aashishpatil-g
Copy link
Copy Markdown
Contributor

Implements streaming support in Firebase Data Connect for subscribe().

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Comment thread packages/firebase_data_connect/firebase_data_connect/lib/src/core/ref.dart Outdated
@aashishpatil-g
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements real-time streaming support for the Firebase Data Connect SDK by introducing a WebSocket-based transport layer and a new streaming protocol. It transitions the library from gRPC to a hybrid REST and WebSocket approach, managed by a routing transport. Feedback highlights critical issues regarding resource management, specifically the potential for leaked WebSocket connections and memory leaks from uncancelled subscriptions. Other recommendations include optimizing the expensive operation ID generation, ensuring consistency by making variables final, and adhering to style guidelines regarding function length and the use of the non-null assertion operator.

Comment thread packages/firebase_data_connect/firebase_data_connect/lib/src/core/ref.dart Outdated
@aashishpatil-g
Copy link
Copy Markdown
Contributor Author

aashishpatil-g commented Apr 10, 2026

The test failures are due to some auth sdk errors. I'll need to rebase on main which has some auth sdk fixes. But didn't want to disturb the ongoing reviews.

EDIT:
Fixed with rebase

aashishpatil-g and others added 9 commits April 10, 2026 13:23
* Initial Commit

* Fix formatting and analyzer warnings

* Fix tests and licenses

* Denver feedback: var initialization best practice

* sorted keys for id generation

* Fix analyze info messages
* Handle disconnects and reconnects

* Address gemini review comments

* Reconnection logic

* Fixes to reconnect on startup

* Fix to decode binary data from server

* Handle gemini feedback

* Update rest_transport mocks with new windows provider sig
* debug logging and hardering

* Hardening: ensure only one multicast stream controller is created in a ref

* Handle cancellations

* Formatting fix
This affects reconnects. Taking tech debt instead.
initialized as a lazy var that is used everywhere instead of computing always
Copy link
Copy Markdown

@stephenarosaj stephenarosaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - requesting changes but really just looking for a few responses / ACK on some comments

Comment thread packages/firebase_data_connect/firebase_data_connect/.metadata Outdated
@Lyokone Lyokone merged commit 6ce6f6b into main Apr 13, 2026
31 of 32 checks passed
@Lyokone Lyokone deleted the ap/pasta branch April 13, 2026 09:19
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.

4 participants