Skip to content

Firestore expose Observable in calls instead of wrapping in ApiFuture #5887

Description

@ChengyuanZhao

Hi there, this is another issue related to the GCP Java Frameworks team's reactive Spring Data project.

We noticed that the main document retrieval method getAll() (and the singular get() is implemented using getAll()) actually creates an observer in-line for the request ,but then wraps the entire return value in an ApiFuture. (FirestoreImpl.java line 154 or thereabouts)

The problem for us is that the ApiFuture requires a whole new thread from the user to actually use, while letting us access the observer (either by accepting a callback that is then called inside your in-line observer or otherwise) lets us utilize the thread GRPC manages, which would be really ideal for us.

So our request is: would it be possible to expose an alternative method getAll and get in the Firestore client that lets us tie into the observer without the extra wrapping layer of ApiFuture?

cc my teammates: @meltsufin, @dzou, @elefeint, @dmitry-s

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: firestoreIssues related to the Firestore API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions