Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Investigate Firebase Cloud Functions For Creating APIs and Scraping #148

Open
RyanMarten opened this issue Mar 15, 2020 · 11 comments
Open
Assignees
Labels
documentation Improvements or additions to documentation engineering

Comments

@RyanMarten
Copy link
Contributor

https://firebase.google.com/products/functions?authuser=0

@RyanMarten RyanMarten added this to the Site Basic Functionality milestone Mar 15, 2020
@RyanMarten RyanMarten self-assigned this Mar 15, 2020
@RyanMarten RyanMarten added the documentation Improvements or additions to documentation label Mar 15, 2020
@RyanMarten
Copy link
Contributor Author

https://firebase.google.com/docs/functions/?authuser=0#how_does_it_work

This looks perfect for what we are trying to do

@RyanMarten
Copy link
Contributor Author

Here are some example functions provided by the firebase team:
https://github.com/firebase/functions-samples

This looks like one of the most relevant use cases:
https://firebase.google.com/docs/functions/use-cases?authuser=0#execute_intensive_tasks_in_the_cloud_instead_of_in_your_app

Execute intensive tasks in the cloud instead of your app

This would be our scraping of data

@RyanMarten
Copy link
Contributor Author

This web crawler and search service from Algolia looks interesting and promising:
https://www.algolia.com/products/crawler/

Firebase has a tutorial on how to use Algolia on their Realtime Database service
https://firebase.google.com/docs/functions/use-cases?authuser=0#execute_intensive_tasks_in_the_cloud_instead_of_in_your_app

@RyanMarten
Copy link
Contributor Author

@RyanMarten
Copy link
Contributor Author

For external calls you need to use the Blaze plan:
https://firebase.google.com/pricing/
https://stackoverflow.com/questions/43415759/use-firebase-cloud-function-to-send-post-request-to-non-google-server

The first 2,000,000 invocations, 400,000 GB-sec, 200,000 CPU-sec, and 5 GB of Internet egress traffic is provided for free each month.

@RyanMarten
Copy link
Contributor Author

I'll upgrade the account now, I will just have to put limits on it so it doesn't charge me :(

@RyanMarten
Copy link
Contributor Author

@RyanMarten
Copy link
Contributor Author

Screen Shot 2020-03-24 at 11 42 22 PM

No spending :)

@RyanMarten
Copy link
Contributor Author

Can use a local emulator for Firebase Functions so you don't use up the cloud calls:
firebase emulators:start

See https://firebase.google.com/docs/functions/local-emulator for more!

@RyanMarten
Copy link
Contributor Author

@ribhav99 the demo is not working entirely for me. You might want to try a different way of getting the text out of the HTML. Jquery might be helpful, im sure that there are web scraping libraries that also do this work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation engineering
Projects
None yet
Development

No branches or pull requests

3 participants