FLIP 73 - Proposal to add Event Streaming to Access API

Hi everyone,

Seems we somehow missed posting this FLIP into the forums here when we published it a few weeks ago, so catching up and apologies for the miss here.

TL;DR - the model where integrators have only REST and gRPC endpoints which need ongoing polling has a number of down sides and limits options considerably for builders. Events are increasingly important in dapp development and so it is proposed that we support push-based event streaming to provide better options for builders and improve network scalability. It is our hope that FLIP-73 sets the foundations for more diverse and varied ways to integrate with Flow which are better suited to certain use-cases or builders.

We would love your feedback on the FLIP and look forward to hearing from you all!

Thanks

1 Like

Following up on the FLIP, here is to summarize the discussion so far in the PR and on discord.

There is general agreement with the approach and proposed solution. The comments so far have primarily been requesting addition features. The main asks are:

  1. Add event streaming to REST API.
  2. Add streaming to other Access API endpoints.
  3. Include a way to use wildcards in filters (e.g. A.0x1.*.TokensWithdrawn).
  4. Include the ability to filter on event payload (e.g. all TokensWithdrawn events with a specific from address).
  5. Include additional metadata about events in the responses. In particular, the emitted count for each event type.

While this FLIP focuses on events, it sets the foundation for expanding streaming to other endpoints in the future. The REST API will definitely also have event streaming, but the initial implementation will be most likely be the gRPC/gRPC-Web APIs.

Points 3, 4, and 5 will be addressed in separate FLIPs. The additional filters have some complexity and merit a separate discussion on their design. The metadata will require event indexing on Access/Observer nodes which is out of scope for this FLIP.

If you have any feedback, please add it as a comment in the PR. We’re planning to end the discussion phase on April 14.

Can we use grpc streaming with grpc web? I think at least giving an option to use streaming api with fcl would be great. ( but can be another flip too )

Is there any reliability guarantees? I am still scared of missing event or execution data tbh. At least some sequence number per message etc?

1 Like

Yes, gRPC-Web is included here. It just may not be in the PoC implementation.

1 Like

Can this FLIP be now marked and implemented?

Yes thanks