Cost of developing a Google Assistant App? - firebase

What costs are involved with developing and/or releasing a Google Assistant App?
eg: Can you develop an app using DialogFlow and a backend (say Firebase) without having to pay while you learn?

First of all - you don't need to use Dialogflow or Firebase to develop your action. Both are suggested, but neither are required. You can use any NLP you want, or none at all if you use the Actions SDK (but you want an NLP). You can use any backend at all, including running it off your local machine and tunneling to it via ngrok, but you don't want to do that for production.
But, during development (and even during a light deployment before your action becomes massively popular and a stand-out hit), you have lots of solutions that will be free.
Dialogflow is free for use with the Google Assistant. Period. There is an Enterprise edition which offers additional services and support for a cost, but you won't need them. There are restrictions, but you won't bump into them until you hit 3 requests per second - which you shouldn't during development.
Firebase's free tier (the Spark Plan) is good for very simple experimentation, but once you start doing network calls to outside Google's network (if you are trying to call the network API for other services), you will be blocked. No worries! The "Blaze Plan" paid tier does require a way to bill you, but they don't start billing you until you get quite a bit of usage: 2 million function calls / month and similarly scaled usage of CPU, memory, and network. So even the "Blaze Plan" will be free during development (and for basic usage).
Updated, December 2020
Things have changed a bit since the original answer was posted, but the underlying basics remain true - there is no charge to develop for Actions on Google.
Dialogflow now has an "Essentials" edition and a more advanced "CX" edition. While you can still use both to build Actions, they're not really intended for this purpose anymore.
Instead, Google has included the Actions Builder into the Actions Console to handle the NLP work. The Actions SDK works with this, but can also just pass along all the STT information to your webhook. Both are also free to use.

Dialogflow is for free if you don't use it as an enterprise:
https://dialogflow.com/pricing/
And Firebase free tier should be enough if you not using firebase
already for other projects. enter link description here
But of course you have to calculate your own time so in case of the
spent time probably not.
For everything else yes it is, as long as you not using it already somewhere. You can for development also host your server local and use an ngrok tunnel as sever address for Dialogflow.

As an addition to shortQuestion's answer:
The free plan in Firebase should be enough if you're just using it for learning and developing apps for personal use. If you want to go a bit further you'll need to upgrade the plan.
You can sign up with a free trial for actions on Google to get 300$ of credits during a 12 month period which would be more than enough to do anything you want.
The costs of Firebase/Actions on Google on a higher plan aren't anything to worry about though, you'd be talking about a few cent per multiple hundred thousand requests.

Related

Firebase Automated Cron Job Options Without Functions

I have an app (Flutter using Android Studio) I am on the final stages of and I would, in an ideal world, want to include a feature to notify the user via a mobile notification if a date held against their UID is equal to today (let's use a birthday as an example).
I've spent 2 days looking in to all options, and was very close to using Cloud Functions to store a once a day cron function to notify all users, using FCM, based on the condition above - but something stopped me.
I'm very new to app building. So new that I can not confidently say I do not have a bug or infinity loop somewhere to rack up a huge bill upgrading to the Blaze plan - which without I can not use functions (I literally had credit card in hand on the upgrade page and stopped).
After 3 months of app building I feel I'm between a rock and a hard place. I don't want to launch without auto-notifications (as it's pretty key to the slickness of the app) BUT I can not risk a skies the limit, no-cap, no protection Blaze account if the worst was to happen.
It seems crazy for the effort to be put in to Firebase by Google, which to be fair helps new developers code and launch apps, to put them unnecessarily at risk or cost without automated protection. At least the Flame plan capped your spend - but I can see this is a real concern to new app developers such as myself (I've developed for the web for years). I just can't risk Blaze. I am more than happy to pay for things I use, but not to put myself at risk. Anyway I digress...
Without upgrading to Blaze - is there anyway a newbie such as myself, who is still learning the ropes, I can use FCM, and a cron job, to every day check the Cloud Firestore for users where a certain condition applies (i.e. UID date = today) - and notify them through a notification to their mobile device?
I would recommend using Google Cloud Functions and Cloud Scheduler to accomplish this.
It is worth noting that Firebase + Google Cloud provide an amount of free usage per month. It is quite likely that you could keep your usage under the limits, at least initially. Also, if you are a new Google Cloud customer, there may currently be a trial offer you can redeem for things not covered in the free tier.
https://cloud.google.com/free
https://firebase.google.com/pricing
https://cloud.google.com/scheduler

How can you limit the billing in firebase? They used to have this possibility, it looks like they removed it [duplicate]

I'm currently working in a social network app and I need to do a search feature. Firestore does not support these kind of queries, so I need to use an external service like Algolia.
The problem is that the free plan does not support connecting to external websites/APIs other than Google's own ones, so I can't connect to Algolia to get my search system working.
I have read multiple stories about devs paying high bills because of loops or errors in their code, and as the Blaze plan is a pay-to-go plan, they get charged what they used. If a loop generated 10TB of files they will get charged for that.
I also know that Blaze plan's features are free as long as each of them (individually) stay below the limits of the free Spark plan.
So as my question says, is there a way to set limits? For example, I would like to tell Firebase to limit my cloud functions invocations to 100k per month. That way it would be free and I would never be able to get over 100k as it's limited, which means I'll never get billed for that.
Take into account that the only thing I need right now from a paid plan is the connection to external networks. I don't need anything else as we're just starting and the app is not in production, so there's no need for huge limits.
Every Firebase project is also a Google Cloud Platform project. This means that many of the advanced features of Google Cloud Platform are also available for your Firebase project.
For example, you can set up billing alert for your Firebase project, so that you are alerted when the usage reaches a certain level. While you can't configure it to switch off the project at some point, the alert should typically be quite good for alerting you to unusual usage patterns.
For more on this see:
Tracking your spending with budgets in a recent blog post.
The GCP documentation on how to set budget alerts, which is what Firebase uses under the hood.
The GCP documentation now also has a section on capping (disabling) billing to stop usage. This is a brute force approach though and may lead to data being lost, so I'd recommend investigating all other options first.
Update (December 2020): Firebase's Todd Kerpelman just released a series of videos where he disables billing using the process from the documentation mentioned above.
You cannot set spending limits to your app now.
As of December 12, 2019, you can no longer create spending limits, but
you can change or remove existing spending limits.
https://cloud.google.com/appengine/pricing#spending_limit
You can create budgets, which will alert you when reaching the budget. But it won't stop the usage when hitting the budget.
https://cloud.google.com/billing/docs/how-to/budgets#add-new-budget
The screenshot here seems to show a Spending Limit setting for Firebase projects: Firebase: Budget and Daily Spending Limit
That settings page is located here (the Spending Limit setting apparently only shows up once you set up billing for the project): https://console.cloud.google.com/appengine/settings
It's disabled in the poster's case, but I think that's only because he connected it up to a "NodeJS App Engine app", which isn't the case for many Firebase developers.
I haven't tried it yet myself, but will do so once I start a paid plan.
EDIT: Yep, the setting shows up once you switch to a paid plan. (in my case, Blaze) I don't have enough traffic yet to confirm that it works as expected, but if I find later that it doesn't, I'll give an update here.
"This example shows you how to cap costs and stops usage for a project by disabling Cloud Billing. This will cause all Google Cloud services to terminate non-free tier services for the project."
Google Cloud Source

Payment SDK's with Firebase

I have never dealt with payment SDK's before. I want to implement Stripe into my app to handle in-app payments, but implementing this may take some time and quite a bit of trial and error.
The issue I am facing is that Firebase requires either the Spark or Blaze plan in order to implement these into the app. But, I do not want to pay for the plans until I am ready to fully launch my app. Is there a good way to test out payment SDK's in Firebase without paying for a plan?
I know that the Blaze plan is pay-as-you-go, but I am hesitant to get the plan now as I am sure exactly how much it would be costing me on a monthly basis while I am just testing things out.
Thanks.
You are correct in that to integrate 3rd party systems into a Firebase project you have to upgrade to a paid plan. The Blaze plan is the Flame + pay as you go. So if you are not hitting your free limits per month (which if you're the only tester, it is highly unlikely), your cost will just be the cost of the Flame plane, or $25/month (at time of writing).
To test, you can locally run your Cloud functions using the Firebase shell. That will confirm them working before you deploy to the GCP servers. Once you have your pay plan setup, just do a regular deploy and it should all work correctly. You will of course need some integration testing based on what apps you are using (web/ios/android).

Need clarity on how pricing works on Smooch Sandbox

I have created a free trial account on smooch that gives me access to their WeChat API in the sandbox. However, it is still not clear to me what happens after the 14 day trial period is over. Will I be forced to upgrade to a paid plan even for using the sandbox or is the sandbox always free. Note: My intended use is to develop and test our app against their API and hence I will always need API access in their sandbox. Our production usage will be on a different account with the relevant paid plan. Will really appreciate someone sharing their knowledge around how it works.
The trial period applies only to usage of the Smooch Public REST API and Webhooks, so if you intend to receive and reply to messages programmatically, then the trial will not be sufficient for testing or development beyond the 14 day period. If you intend to receive and respond to messages using one of the built-in Business System integrations like Slack or Zendesk, you can continue to use those integrations after the trial period expires.
If you have a paid account already, you could also create a separate Smooch App for testing under that same account and take advantage of the API access afforded by your plan.

Is Firebase an all-purpose database?

I've been reading about Firebase and playing with it for a short while. The idea (BAAS) and implementation are impressive, and having programmed with Javascript it seems a viable choice. Not having to deal with scaling and other server side concerns makes it even more attractive.
My question is: generally speaking, is Firebase a first class back-end candidate for any average data-based application? e.g. billing, CRM, e-commerce, social, location based, etc. I do not include super light or heavy extremes such as a basic chat, or a nuclear plant monitor...
The answer may not be a clear yes/no, but was it built to support the general application space, or just stand out as a real-time read/write data service?
Would appreciate answers based on experience and existing production applications.
Thanks
Yes, Firebase is intended to be a first class back-end for any data based Web, iOS or Android application. The service offers real-time data reads and writes, but also comes with a powerful and flexible security system that allows you to write secure client-only apps, without needing any server code to enforce data boundaries.
There are several apps in production listed on the front page as customer and on the app showcase page on https://firebase.google.com/customers/
Firebase is now more capable and is considered as a full stand-alone back-end, especially after the introduction of cloud function. https://firebase.google.com/docs/functions/
Firebase may not have support for transaction spanning multiple business objects.
e.g. When a sales order is booked then it needs to update inventory for multiple items, update billing in receivables, give sales credit to multiple sales persons etc.
Firebase team is supposed to come up with a database trigger option which will make all these happen.

Resources