Using both Firebase and Amplify in one React native App - firebase

There is a big debate on the internet about Firebase vs Amplify. Get that. What I dont get is why so little to noone actually considers using both, or nobody just writes about it. To me both have clear advantages in different fields:
Firebase definitely seems to be handier when it comes to analytics and push notifications , AWS doesnt even offer ads as far I as know. And Pinpoint is quite confusing in its documentation.
AWS Cognito make more sense to anyone using AWS Services for the backend.
Firebase also offers all analytics and messaging for free regardless of the amount of data, whereas in AWS as usual you are hooked in right away with more AWS services. Firebase Storage is also more expensive than AWS once you have some significant traffic.
So I was thinking why not using Amplify SDK for Cognito and S3 whereas Firebase SDK takes care of analytics, Push Notifications and Ads. I dont see any disadvantages myself, but again - i have never built a mobile app, I am a pure backend developer. Can anyone come up with problems of this setup or just confirm it is absolutely fine?
Thanks!
ps. i am thinking of an app written in react native

I'm early into very similar research, so take this information with a grain of salt.
Regarding push notifications, Amplify's documentation for Android includes either setting your app up in Firebase or using Pinpoint. This documentation can be found here:
Amplify Push Notifications - Getting Started
This appears to be a direct tie to Firebase's push notification functionality, so I don't believe you'd get any of the other features Firebase offers with this implementation.
Regarding the other features, I believe your assessment is correct in that whichever deployment toolchain you choose to use you're subject to their analytics options.

I am also working on something similar and have always wondered why there isn’t more out there on this subject. Leveraging the best from both seems like the next step when looking to implement either.
Did you come across any issues?
I’m using Firebase SDK for Authentication, Auth, and Firestore (albeit will probably switch to S3 for storage). Amplify for everything else. NextJs frontend, no mobile.

Related

How to use Firebase (or Firestore) as an intermediary between a desktop app and an external API endpoint?

I have a desktop app that will be distributed to users, and part of its code (which the user might be able to access) has to perform an API call to a third-party web service. However, this requires the API keys to be embedded into the source code, which causes some obvious security issues.
The main solution I've found while researching on the subject is to have a backend server between the user and the third-party API endpoint. So, I've been looking into Firebase for a while and it seems that this solution can be implemented using Firestore and Cloud Functions.
But, I wasn't able to find any clear examples that achieve something like this, and since I have no previous experience with Firebase or just backend programming in general, I would like to know if I'm on the right track and get more details about how to get it done, or if there are better alternatives for solving this issue. Any input is appreciated, thx.
You can use the firebase cloud functions as you mentioned. Your desktop application will be communicating with the cloud function - simple API call. Here you can find examples how to implement and deploy functions and test it locally https://firebase.google.com/docs/functions/get-started. Your cloud function will hold the API keys (it is backend so it will be secure if you dont expose it explicitly. Also the backend to backend communication is considered as secure). Finally, this cloud function will call the third party service and return some data back to the desktop app if needed. So you are on the right track, that is how the design should look like. If you need some help with cloud functions, you can also contact me directly.

How can i use Cloud Firestore and Firebase Auth for windows

i have a app both mobile and web in flutter so i want to create for desktop App, but base on the plugin does not support windows..
How can i use cloud Firestore and Firebase Auth in windows
Since the plugins don't support it, and there are no SDKs for Windows for either of the products, the most likely only option is to wrap the REST API that both provide. See: Auth REST API and the Firestore REST API.
It might also be worth checking out the Firestore gRPC API and its .NET client library, although I'm not sure if the latter is meant for use in client-side code or just for use in a trusted environment.
I had the same problem with desktop app in c#, there is not a lot of examples on the web. You are asking about flutter but I think my answer still should help you as the implementation is less important than concept.
You need to call your service and ask for custom_token, next with this custom_token you are calling google service and exchange custom_token for access_token. With this access_token you can call your service.
I created the the solution react.js+python+c#+firebase to have example for a future.
You can check the example on github
The firebase documentation regarding this topic is here

Firebase in frontend or backend

I read firebase is referred to as backend as a service, but in its documentation it supports Nodejs. Java, Python, Golang, etc along with Web, Android, and IOS
My question is why do we need backend if firebase itself is a backend as a service.
Incase your requirements exceed what firebase offers out of the box, firebase will still give you the ability to manage your data in programmatically.
For most use cases, you won't need your own backend. But in some cases you will for example need a custom sign-in flow, or perhaps a custom dashboard to manage firebase users. In those cases firebase gives you the flexibility to do so using the firebase admin SDK, which I believe is being referred to when they list 'Nodejs. Java, Python, Golang' as supported languages.
Checkout the firebase admin documentation here to understand what you can accomplish using it. Depending on your needs, you might not need it at all.
You may be interested to interact, from some backends that you own/control (e.g. a server in your premises), with some Firebase services hosted in the cloud in the Firebase infrastructure.
This can be interesting, for example, to integrate some of your legacy applications with Firebase.
You’ll find here and here two videos from Firebase that show some real life examples.

Can Firebase be used in an app supported by another Backend and Database?

I am looking to make an app that would have its Backend on another service like AWS or some other. This app would be having many features and functionalities.
But for chat feature, I am exploring options and wondering that would I be able to integrate Firebase in my app.
I have read about Firebase Functions to add more functionality at the backend and also the installation of Firebase Admin to servers.
But still I am not convinced about their capabilities and exactly what all I can do with them.
It would be great if someone who has experience with Firebase help me out figuring if going with it is the best case for me or is there something else I should look into.
So first you can't use Firebase in combination with AWS or Azure etc. Firebase is based on Google Cloud and is the interface between the mobile client (the running app on the client's smartphone) and the backend (your Firebase project).
What I use is, for example, Firebase Cloud Messaging, to simply notify one or multiple users by trigger an HTTP Request from my own web server.
I also made some apps to store the data in FireStore or in the Realtime-Database, so that I don't have to set up a whole new infrastructure. And this is basically the goal of Firebase that you can simply start with your app, without carrying about that.
So what I've heard about Firebase is that you currently cannot install Firebase on a server of your choice and you have to use Google Cloud.
Hopefully, you can do something with my answer. If you have further questions feel free to ask them.

Push notifications: Why use Amazon SNS over Google's GCM/FCM?

I have created a mobile app for Android and iOS using Phonegap Build. Last year I had nearly finished writing code to use GCM (Google Cloud Messaging) for remote push notifications - which can go out via Apple's APNS too - but the project was shelved.
This year the project is resurrected and I find Google has changed everything to Firebase (FCM). I then read some enticing things about Amazon SNS handling notifications. Just when I started to think SNS might be a better option, I noticed you still have to set up GCM/FCM anyway, and pass all those details to SNS.
So is there any benefit to using SNS when I've got to do the full FCM setup as well?! Both services seem to offer the same features: interact with APNS if required, subscribe to topics, provide you with a nice API/SDK, etc. The app code, and the server-side code would be no simpler, as far as I can see. Why add another layer (SNS) on top of FCM?
(I'm trying not to let this be an opinion-based question: I want to know whether SNS is saving me any effort, giving me any advantage, or adding any features that FCM does not have.)
Just some thoughts.
If you are already using some mobile AWS SDK, then it's more convenient to use it for SNS too.
That also helps keep your app smaller.
And you're happier as a developer since API calls are somewhat unified.
If your backend is hosted on AWS infrastructure you can use IAM roles for EC2 instances (also Lambdas etc.) to make those call without access key/secret key.
You get metrics in your CloudWatch.
But Firebase Cloud Messaging is free :)
Let's answer a few questions first.
1.Do you want to develop, maintain and run the code to talk to GCM?
2.Do you wish to do the same for another platform (iOS, Kindle Fire), if you choose to develop your app for other mobile platforms.
3.Do you want to manage change of registration_id's by yourself?
4.Do you care if a notification is delivered to your users a few milliseconds later?
If you answered NO to any of the questions above, I recommend using SNS to deliver push notifications to iOS, Android and Kindle Fire devices.
SNS talks to GCM to deliver notifications to android devices. Here is what SNS can offer you.
Simple API to send notification to heterogeneous platforms.
Manages application registration_ids. As a developer you don't have to worry about change of registration_ids.
Scales really well. You don't have to worry about managing infrastructure if your app becomes super popular.
Can tolerate GCM downtime & throttling.

Resources