is it possible to connect to my MySql Db (Google Cloud SQL) with a Firebase function (Not google cloud function)? I found an old question about that, from a couple of years ago, and at that point it was not possible.. Does anyone know if it is possible now?
Related
Scenario:
I am working on a POC locally where I am using Firestore as my database. As it is my local setup I am using Firestore Emulator. Now my POC is successful and I want to move local database from emulator to actual Firestore.
Query:
Is it possible to achieve what I am trying to do?
So far I am not able to find any relevant content on internet around this. I did find couple of examples where there is demonstration of exporting data from Firestore and importing to local emulator but I was not able to find the vice-versa option!
Firebase does not provide any sort of tool or service to do this. Your easiest alternative will be to write a program to query the data out of the emulator and write it into your cloud hosted instance. You might find the Firebase Admin SDK helpful for writing to the cloud in a program that you run locally.
This question already has an answer here:
How can I rent and use my own servers for cloud functions? [closed]
(1 answer)
Closed 1 year ago.
The cloud function in firebase needs you to enable the billing plan.
Can I use cloud functions on my own Nodejs server and access the events by installing npm install firebase-functions without enable cloud functions on firebase?
No. You can only use the Firebase Functions Emulator to test your functions locally (you cannot deploy to Firebase unless you enable billing). Self-hosting a server is different and using server-less Cloud functions and may not be as easy to scale like Cloud functions do.
The events (like Firestore triggers) that you are referring to can be used to trigger Cloud functions only. If you host your server on your server then it'll be best to route all the operations through it. For example, if you wanted to trigger a function when a new document is added to Firestore, instead of creating the document directly from client make a request to your server and add the document using Admin SDK and process anything else at the same time.
I have a Firebase realtime database project that was originally created on the central1 server (USA).
The problem is that the applications using this database and the Cloud Functions related are all used in Europe (mainly France). Someone in the same situation changed the server to "europe-west1" and noticed a big improvement in term of speed for the Cloud Functions.
So I have several questions : will it really affect the speed? And also, do I have to change both the database and the Cloud Functions locations to make it work smoothly?
It is easy to change the Cloud Functions locations but it seems not possible to change the location of a realtime database once it is created.
I am afraid having a database located in USA and the Cloud Functions running from Europe would be even worse...
According to the Cloud Functions documentation the region recommended to deploy the Cloud Function if they are triggered by or uses a Realtime Database is always US-Central1.
An alternative to provide a better experience for the non-us users could be implementing a small function in the EU zone for all the non database related job that later connects to the Cloud Functions that does all the job related to the database.
I'm teaching myself to use Flutter and I'm making an app that queries The Movie Database API. Currently, I'm having the client query the API on launch but I'm thinking this is not the most efficient way of doing it, and I would rather have the client query a backend service like Firebase to get the same data.
I would appreciate some guidance into where to start in order to setup a periodical process to query the API and use the results as entries into a Firestore DB. I've looked online but I might be using suboptimal keywords since I haven't found a good tutorial or example for this.
Thanks.
You can use Firebase Cloud Functions to build code that runs on Firebase servers to fill your Firebase database, but you can only make HTTP requests to non-Google addresses if you use a paid plan.
https://firebase.googleblog.com/2017/03/how-to-schedule-cron-jobs-with-cloud.html explains how to invoke periodic tasks with Cloud Functions. It utilizes Google AppEngine for that because Cloud Functions doesn't provide that out of the box.
I am looking for a solution for developing iOS and Android chat to replace our current (unreliable, maybe poorly written by previous devs) XMPP/OpenFire chat. I came across Firebase which looks good. However, I don't quite get the setup for it.
Can I host Firebase on my own server and not have to subscribe to any of Firebase's plans?
Firebase offers a few products:
the Firebase realtime database
Firebase hosting (for hosting static resources)
Firebase authentication
I think you are looking for the Firebase realtime database.
There is no way currently to host the Firebase realtime database on your own servers.
Probably to late to be of any help but an alternative is RethinkDb. It is an open source realtime database and can be installed on your own machines.
Never used it myself just researching my options like you.
One more tool to add to the list is Appwrite. It is a self-hosting solution that seems to be inspired by firebase. It has much if not all of firebase's functionality. PS: I am not in any way associated with the project, just a (happy) user.
You should check if RESTHeart fits your needs. It's mainly a REST, GraphQL, and WebSocket API on top of MongoDB, but it has many additional features
The Open Source Firebase Alternative supabase
currently it supports Postgres realtime Database, Authentication and storage only .
And it can be installed on your own server supabase self hosting docs