googlemaps / gmp-firebase-extensions

Apache License 2.0
6 stars 5 forks source link

Add a throttling function for BQ remote functions #15

Open ryanbaumann opened 1 year ago

ryanbaumann commented 1 year ago

Thanks for stopping by to let us know something could be better!


PLEASE READ

If you have a support contract with Google, please create an issue in the support console. This will ensure a timely response.

Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform support resources page.

If your bug or feature request is not related to this particular library, please visit the Google Maps Platform issue trackers.

Check for answers on StackOverflow with the google-maps tag.


Is your feature request related to a problem? Please describe. For the BigQuery remote function implementation - a throttling / exponential backoff function will be important for most customers to obey rate limits for running against any tables with >1000 rows. Specify a default rate limit aligned to standard GMP API rate limits per service.

Describe the solution you'd like A function in the extension to specify the max QPS the remote function will use. Then the function will execute the remote function respecting the max QPS specified.

Describe alternatives you've considered Creating a throttling function outside the extension library would be inconsistent and a poor devX. Many developer would run into QPS issues and generate errors in their BQ remote function.

Additional context Add any other context or screenshots about the feature request here.