Can we use cloud functions alongwith mySQL database? - mysql

I have read many example and articles on this,till now I got to know cloud functions uses firebase database either firestore or real time database.But ,I want to know if it is possible to use mySQL database and use cloud functions with node.js script as backend?
And then I will use this cloud function in my flutter app.
Any help is appreciated.

You can do most things in Cloud Functions that you can do in server-side Node.js, Python, or Go (the languages supported for Cloud Functions)
You can access Cloud SQL (MySQL or PostgreSQL) but you can also access any other server exposed to the Internet from Cloud Functions.
To be able to access servers outside Google Cloud, you need to use have paid Firebase plan though.

Related

Google Cloud MySQL Instance Access Control possible via Firebase Anonymous Authentication?

I am currently building a price comparison serverless web application on Firebase Hosting with more than 300K products (documents) in a Firestore DB.
Firestore has still some limitation when it comes to filtering (see here) so im trying to find an alternative to Firestore DB that includes some sort of authentication.
Note: being able to filter for multiple keys (e.g. all blue cars sorted by ranking index and cheaper than 25K is currently not possible in Firestore) is more important than scalability
Question: is it possible to use the Firebase Anonymous Authentication method to limit access to a Google MySQL Instance?
Google Cloud SQL is not integrated with Firebase Authentication. So you can't securely access your Google Cloud SQL database directly from client-side application code. This applies to all supported Cloud SQL databases (MySQL, PostgreSQL, and SQL Server at the moment).

Saving one record using Google Cloud Functions and then overwriting it

I'm working with gmail API and need to save the historyID to determine the changes that happened in the email from the pubsub events.
However, I don't need to store all the historyIDs and just need to pull the old historyID, use it in my function, and overwrite it with the new one.
Wondering what kind of architecture would be best for this. I can't use the temp storage of google cloud functions because it would not be persistent.
Using google sheets requires extra authorization within the cloud function. Do I really need to make a new cloud bucket for one text file?
It seems like Cloud Datastore would be your best alternative to Cloud Storage if your use case is to persist, retrieve and update the historyID as log data at low-cost. Using Google Cloud Functions and Cloud Datastore would be like a server-less log system.
Datastore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. It can handle large amount of non-relational data with relatively low price. It also has a user-friendly Web Console.
I found a very useful web tutorial which you can use to help you architect a Cloud Functions with Cloud Datastore solution like so:
Create Cloud Datastore
Obtain Datastore Credential
Update your Code
Deploy your Cloud Function
Send a Request to Cloud Function
Check the Log on Datastore
Take a look at the full tutorial here. Hope this helps you.

How to use Oracle database as web service provider with JSON?

I'm considering an option to use Oracle Database as web services provider and implement web service logic via PL/SQL stored procedures. I used to code stored procedures some time ago, though I'm not sure what direction should I go in order to use most up to date solutions:
I would like to use amazon cloud for oracle solution. After creating oracle instance, what else should be done in order to use it for serving as web server. I didn't find Amazon Cloud for Oracle Application Server or Glassfish. Also, I need to use JSON but it's unclear does Oracle have such support out of the box. Currently, I found the only option to use Soap 1.1 with Oracle XML DB
Should there be two DB instances for security issues: one node serving as data source and the other one serving as web service provider.
Would appreciate for any ideas and info :)
You might want to review the Oracle Rest Data Services Developer Guide
Amazon provides Oracle access in their product "RDS", but I've never tried it. However, I doubt that you'd be able to use the Oracle web listener directly.
JSON support is not included in Oracle AFAIK, but it should be easy to implement on your own.

What database-as-a-service providers (ideally either Mongo or MySQL data sources) offer a REST API for retrieving data as JSON?

We would like to hook up an iPhone app directly to a database in the cloud. From the iPhone app, we would like to use some REST API to retrieve data from the cloud database. We prefer using MySQL or Mongo as the data store.
We prefer not setting up our database system on AWS or another hosted provider. We would like a cloud service that offers the database layer out of the box.
What database-as-a-service companies support this, and what are the pros/cons of each?
We looked around, and it seems like MongoLab is the only service offering a REST API.
Mongo is a great database for API interaction as the query language uses javascript expressions. Here are the open source API libraries that are implemented in Python
Sleepy Mongoose
Eve
Primary advantage
JavaScript can handle the querying part of data retrieval
Primary disadvantage
The API libraries above have difficulty capturing complex queries

can i use mysql for django on appengine?

Can i use mysql database connected to django application on for appengine paltform ??
A relational database is only available on their business version, google appengine uses google bigtable by default.
Since you're using django on appengine you might want to check out http://www.allbuttonspressed.com/projects/django-nonrel for easier database handling if you find it too intimidating