https://aws.amazon.com/serverless/ will let you host a function that you can call. Since your script is so small this is the perfect usecase. You also only pay for computation time and not a hosting box that just sits idle for 98% of the time.
Some alternatives to this are https://stdlib.com/ and https://firebase.google.com.
You need to change the way you structure your data. You are making 458 separate requests when you should just be making 1 if you structured your data properly. Look into: https://firebase.google.com/docs/database/ios/structure-data
I find it ironic:
> Google Analytics for Firebase is enabled by default to provide the full range of FCM features.
then over here
> In some cases, you may wish to temporarily or permanently disable collection of Analytics data, such as to collect end-user consent
Yeah...That's not how it works. You get consent before doing a damn thing. The only 'default' for the GDPR is to not enable tracking without the users consent.
Google should disable tracking by default for EU subjects, as is required (opt-in/consensual).
Interesting...the login with FB SDK had to change so that data was not collected and I thought the login with Google also said that ATT consent was not going to be used due to lack of IDFA/device level identifiers being transmitted off device for that functionality.
Honestly, this feels like a Ebay instrumentation issue because Google shouldn't require ATT consent here.
Oops, yeah sure. When you turn that switch off in Settings it calls Analytics.setAnalyticsCollectionEnabled(false), per Firebase's documentation: https://firebase.google.com/docs/analytics/configure-data-collection, which says "collection is suspended until you re-enable it".
If the OP has more specifics as to what it's doing when it should be turned off I'm happy to look, it's possible there's a bug in the documentation or something I misinterpreted, but the "disabler" seemed pretty straightforward.
I'm concerned about Google neglecting the open source APIs available to app developers and only developing those features in their proprietary Play Services. For example, Android apps don't have a great way to check for notifications from a server (imagine a chat app / email client) apart from the app running in the background directly checking the server every x minutes, unless developers use Google's proprietary API & servers (see Firebase Cloud Messaging / Google Cloud Messaging APIs).
For example, I don't have Google Play Services installed on my Android phone so even though I manually installed the Slack app, and it works if I keep the app focused, I never receive notifications that someone messaged me. I have another chat app that's open source, and to avoid using Google's APIs it has to stay running in the background, with Android complaining about the app draining battery since it's running (undismissable notification). Since Google's taken pretty important functionality and only made it available for devices with Play Services, you also can't find many of these apps in other app stores including Amazon's.
Google's excuse would be that these messaging services use Google's servers, hence it can't be in stock Android; but I see no reason why a hypothetical stock Android API couldn't allow developers to use their own servers instead of being forced to rely on Google's.
Well, that's the problem. If you look at the % of total iOS apps it doesn't tell you the whole story either.
It could be 0.0001% of apps, but if that single app is a popular app, then you have a serious problem.
See what I mean? Percentages are not useful without context.
What you should know is if you head over to https://firebase.google.com and scroll down, you'll see that some popular apps like NPR One, NYTimes, Duolingo, Shazam, Lyft, and Venmo use it.
There is no confirmation about which of the apps I just named were or were not vulnerable to this I'm just pointing out that there are some very popular apps which may have been vulnerable... we do not know. Presumably, the developers of respective apps will be notifying users if any breaches occurred.
Percentages misrepresent things. As far as looking at the number of users impacted, we do not know until Google releases the list of vulnerable apps, which should happen soon after they've confirmed that it's ALL patched.
You should definitely have a separate testing environment from production if for no other reason than to prevent fat-fingering things. In GCP, that's probably a separate project since projects are basically the unit of isolation over there.
As for being able to run your own instance of things in isolation, that really depends on the fidelity you want. Firebase has an emulator you could use, and Cloud Functions/AppEngine can be built into docker images locally using the public buildpacks (but won't have the full suite of attached services), but I'd probably recommend good service mocks/stubs/fakes your services plus a pipeline that spins up a full project with Terraform, runs integration tests, then tears it down for e2e testing.
Hmm, I wouldn't say it solves everything. You should be aware of the query limitations as some of them could catch you by surprise (e.g. there's no "not equal to" operator or logical or):
Completely understand. We have the advantage that Throne is not completely new, we started in March and have transacted hundreds of thousands for 5000+ creators which can vouch for us.
Regrading data safety: We use Google Firebase to host our backend data (which is essentially a backend as a service). This means that all of Google's security measures to protect sensitive data are in place, not just our own. Essentially the only way to get access to our users data would be to break into Google's own internal servers and then bypass their encryption methods and authentication steps. Private data such as address are hidden even internally and automatically pre-filled into checkout forms.
Firestore / Firebase Realtime DB are meant to connect directly to your mobile app, so the traditional wisdom of "your client shouldn't interact with the database directly" is mostly wrong. Instead, both Firebase products have security rules (here are links for Firestore and Realtime DB) that you're supposed to set up to ensure that clients are only reading / writing the data that they should be.
I think there is a problem with making HTTP requests to a server in this particular instance. Firestore and Realtime DB are meant to be realtime solutions, meaning that the client doesn't refresh or re-request data when the app is running, it just "magically" receives updates from the server. If you make HTTP requests, you lose this functionality, and you'd have to replicate it yourself using sockets, but I think that's all more work than it's worth. Properly defined security rules should solve the problem.
The senior dev's comment on Swift being a "safe/server language" is kinda senseless. Swift is a safe language in the sense that it's statically typed, has memory safety, optionals, etc. and it's also a server language in the sense that you can build web backends with it, but that has little to nothing to do with whether or not Swift code should connect directly to a database. If your app's database was, for example, a PostgreSQL instance, it would be a horrible idea to let the app connect to it directly, and Swift's memory safety and applicability as a server side language have nothing to do with that. It's just plain bad practice to let clients have unrestricted access to the database, regardless of the language the clients are built with.
You are wrong about Firebase daily limits. Go to this page to check out pricing/limits of firebase - https://firebase.google.com/pricing/
If you know even little bit of python, you can create a super light flask app for your tasks quickly and host it on digital ocean/linode for 5 dollars per month.
For your use case firebase seems to be the easiest and quickest way to get started.
You can't hide anything on FrontEnd. Even if you use environment variables, they will be accessible from the browser's source panel.
Regarding Firebase API keys, it's totally fine to be exposed, Firebase uses the keys to just identify the project, Authorization access control stuff is done from the Firebase panel by security rules. also, there are a few specific services that require some extra steps.
I'll suggest reading this to get more information in detail.
For example. I have an app that uses firestore, a couple functions, and hosting. Monthly I see about 2.5 million individual reads, 250k writes, and about 75k deletes. I get charged under $1.50/month on the blaze plan.
There is a pricing calculator on their website if you know around what your usage will be: https://firebase.google.com/pricing/
Just be smart with data fetching/updating on your site. Employ some caching on the front-end if you want and only use the snapshot updates when you absolutely need them.
Not really since firestore is not technically a sql database despite it having sql like features/queries, that being said probably the most important thing to do would be to make sure your "rules" are locked down. https://firebase.google.com/docs/firestore/security/get-started
> It contains blobs from Google
Only in the same way that a program compiled with Visual Studio has blobs from Microsoft.
Signal references some google libraries for android integration and to make use of firebase.
Unless you can show me something real, you're the one that seems to be posting lies.
I am using Firebase Remote Config for this purpose.
I save a int value indicating the min app version code needed to use the app. When the app is started I check if the value in the remote config is lower or equal to the app version code to continue. Otherwise a prompt to update is shown. I also have another String variable in the Remote Config to indicate the message that must be shown.
If you are using Firebase, their database solution is called Firestore, and the documentation goes through how to set it it up and best practices. This database is a document store, so there are no tables (I'm not really sure why /u/Thanerik's answer is highly upvoted here).
You probably want something like this: https://firebase.google.com/docs/functions/schedule-functions
Create a firebase project. Add this extension for email: https://firebase.google.com/products/extensions/firestore-send-email
Use the firebase storage to track users.
Write a periodic function to check stock and then send emails. https://github.com/wagenaartje/stocks.js/
I've started using the (free) Firebase spark plan to host several small SPA websites.
It allows you to deploy quickly through the CLI and you can always rollback if needed.
You do not need to use their DB and can just serve the static files.
You are not limited to a public repo either.
Firebase Cloud Messaging works pretty well too. I use it with Home-Assistant to get notifications about who's home and other triggers.
use firebase realtime database and presence tracking. you can schedule code to run when a user is detected to be disconnected. how exactly that is defined, I'm not 100% sure.
Instead of repeating previous materials, here are the top 3 sources from Firebase itself:
You might want to look at App Check, which Firebase recently added. Combined with security rules, this gives you both broad protection against abuse, and fine grained control over the data access.
After tapping on the disable button inside the error and usage reporting dialog, we call the following two methods from Firebase: FirebaseAnalytics.getInstance(...).setAnalyticsCollectionEnabled(false)
[...] and collection is suspended until you re-enable it. [Source]. I just checked those two methods get called properly. The documentation for the latter method reads When set to false, the new value does not apply until the next run of the app [Source]. After a device restart, we can be sure that the app restarted.
Feel free to write us at [email protected] if you have more questions :)
Another option might be to publish to the alpha/beta channel of the Play Store, while including analytics for crashes, and including some way for users to provide feedback on their experiences.
You can then move it to a public release when you feel more confident that you're fulfilling your users needs the way you'd like.
I also looked at this quite recently, too. My conclusion: Polling is on mobile is quite wasteful, as it just consumes too many resources (the most noticeable being battery life).
Although Handler and Thread.sleep can support very short periods - the downside with those methods is that you burn through the battery keeping your processes alive. You'll also have to build for situations where your service is stopped by Android so you can get it restarted. Going to foreground on a notification can help as it will indicate to the OS that the user has an interest in keeping your Service alive but it's not a cast-iron guarantee. All of this is less than ideal...
The answer, it seems, is to deliver push notifications from our internet services. I appreciate that when polling a web service, you may not have control of that service - so this may not be possible - but if your service can deliver the push notification, then you don't need to poll for changes. Done right, I think that cuts through the timeliness issue you've got, and also saves you from burning through the battery with endless polling loops.
Take a look at Google Cloud Messaging and Firebase Cloud Messaging.
It's worth mentioning that you can make use of Firebase Test Lab for free with a limited number of tests per day. You won't be able to use the physical devices as if you were holding them, but you can write instrumentation tests, and perform what's called a "Robo test" that will automatically launch and crawl your app. These should give you some assurance that your app doesn't act strangely on a variety of actual devices. https://firebase.google.com/docs/test-lab/
If the flutter sdk are anything like the web (which it looks like it is), this is totally fine. These keys are just used to identify your app with your project. Auth + Firebase security rules are what keeps things under lock and key. Would be nice if they explicitly stated this stuff in the docs (maybe they do and I missed it) but here Frank’s response to a similar question on SO
Edit: actually, looks like they do talk about including api keys in your code:
Storing info that the user already knows (subscription info) in custom claims is fine, IMO
There is a stripe extension that already does all of this btw
The best way to learn Firebase is quite honestly to just follow the documentation. It's one of the most clear and easy to follow docs out there imo. Not sure what stack you're using, but if you're using Swift or Kotlin / Java, the firebase docs have all that info for you. A good way to read the docs is listed below:
For Auth, just check out these docs. Based on your platform, choose it at the side and start reading! For other read / write operations, im assuming you'll use Firestore (easiest to start with imo) so just head over to these docs and start there.
Also, there's r/Firebase which could prolly help you out more than on this subreddit. If the docs are too complicated, there's a bunch of youtube tutorials too just search "<platform> firebase <product (like auth, firestore>" and you'll get a lot of videos.
Yes you're right, a 3GB database will cost you $10/month for storage. You're also right that $5/GB is very high! That's because Realtime Database is meant for small data sets and optimized for latency.
If you have a very large data set, try Cloud Firestore. It only charges $0.18/GB/month for storage which is 27x less than Realtime Database. But it charges more for some other things, like reads and writes in some cases.
See this document for a comparison:
Well you don't, that's the reality.
Till now it's not possible to query for a range on two different fields.
So you can't query
Where lat > 14 and < 15 and long ...
There is a workaround with geo hashing
https://firebase.google.com/docs/reference/node/firebase.firestore.Timestamp This allows you to save a timestamp instead of using local dates
This needs to get more visibility.
Sure OP, you can call it "phoning home" but in reality it's probably just usage analytics, and crash reporting. Both are to help YOU, the user, have a better experience.
A lot of apps use Firebase's Crashlytics & Performance monitor.
But then the Firebase documentation seems to imply the opposite:
>Services in the table above need some amount of end-user personal data to function. As a result, it's not possible to entirely disable data collection while using those services.
>If you're a customer who would like to offer users a chance to opt-in to a service, and the data collection that comes with it, in most cases that just requires adding a dialog or settings toggle before using the service.
I was a bit in shock when I first heard it, but having the Firebase config public is not a security risk. Instead, you need to focus on having the appropriate security rules in place so that access is limited. The security rules are extremely flexible (dangerously so) and let you lock down access to data at any level. Check out the security documentation to learn more - the examples are pretty self explanatory.
If you're just using JSON, you can look into a web-based DB like Firebase which operates all in JSON. That way you can offload from your personal server and can still service your AJAX requests.
From the Firebase site
> Firebase is a mobile platform that helps you quickly develop high-quality apps, grow your user base, and earn more money. Firebase is made up of complementary features that you can mix-and-match to fit your needs.
Edit: Since the person deleted the comment, he/she asked what Firebase was.
If most of the projects are low traffic you might be faster by using some managed services instead of self-hosting. It comes at a cost but you don't waste time on infrastructure.
Managed services are becoming more expensive when you want to scale out which than might be a reason to move to self-hosting to save some real bucks.
Not sure what db type you are using, but since you mention that you are a frontend dev: check what https://firebase.google.com/ does offer for you.
You could use cloud functions triggers for this. You essentially create an event listener that looks for user creation (on firebase) - the rest of the logic is up to you to do whatever you want (i.e. take the user's uid, send it to your db).
So they're just unofficial versions of Firebase Extensions?
Firestore itself does not seem to support full-text search: https://firebase.google.com/docs/firestore/solutions/search. The three options listed look promising.
If not, we are left with using a cloud function to do this.
In-app updates is a great solution for flexible and immediate update. Also, you can use Firebase Remote Config for this. You can define a config key such as minimumVersion in the remote config and you can check this key on your splash or main screen.
You probably need some kind of backend with/without a database, such as Firebase. However this requires the user to signup/login.
If your data is more file oriented, then perhaps a UIDocument / NSDocument combo. It's a pain to make QuickLook plugins for macOS and for iOS, so I wouldn't recommend this.
Tough to answer for sure without more context about when/where your executing that call, but it could simply be an issue detailed in the Firebase docs:
> Note: currentUser might also be null because the auth object has not finished initializing. If you use an observer to keep track of the user's sign-in status, you don't need to handle this case.
The recommended way to get the current user is with <code>onAuthStateChanged</code>
If you are using Firebase Database, then you may be using the wrong database.
Reddit, Amazon, Airbnb probably do not rely on a NoSQL infrastructure and can limit their data queries so that it doesn't go destroy spacial complexities.
The basic idea here is that once a user has created an account, they are assigned a unique identifier (uid). As they go to create/save a particular object in firestore, you'll want to add a field on the object that references their uid. I always have a "creator" field that gets filled with their uid. To retrieve the documents for a user you can use the firebase "where" query. It'll look something like...
docRef.where("creator", "==", uid);
You can read more about these queries here.
This doesn't prevent a user from querying another user's documents though. If they know the id of a particular object, they can just go and query for that. To prevent this, you'll need to configure your firebase rules to limit access based that "creator" field I mentioned earlier. There's an entire section in the documentation on firebase security.
awesome, googled "firebase hosting" and the top result is firebase's description. for the lazy:
>Hosting gives your project a subdomain on the firebaseapp.com domain. Using the Firebase CLI, you can deploy files from local directories on your computer to your Hosting server. Beyond serving static content, you can use Cloud Functions for Firebase to serve dynamic content on your site. All content is served over an SSL connection from the closest edge server on our global CDN.
i've only seen firebase used as a quick-and-dirty database in tutorials and one inherited project so i had no clue about this. thanks for the details and here's hoping your original comment climbs the thread.
edit: no idea whether it's ideal for OP but it seems relevant enough as an option
I've not worked with Firestore before, but a quick look at the API docs shows us that the returned promise value is a QuerySnapshot which implements among other things a forEach method. It is not an array, hence why you cannot call map() directly on it.
Firebase Cloud Storage. Everything is set up for you, you simply have to call the relevant APIs to upload/download files. The free version has a 5GB limit, which should be more than enough for you
> It is against AdMob policy to click on your own live ads. During development and testing, use only test ads. If you do need to render live ads before launch, avoid clicking on them. If you click on live ads, your AdMob account may be suspended.
No time based triggers (though great feature request: https://firebase.google.com/support/contact/bugs-features/)
Do you have a particular use case in mind, it may be there is another route to get to similar results?
You have two choices, one is easier than the other. The easiest is to let Firebase take control of your auth by using it in the Frontend, see: https://firebase.google.com/docs/auth/web/password-auth
The other more complicated choice is to use Firebase Admin SDK to handle the authentication but you need to manage the tokens provided by the SDK. https://firebase.google.com/docs/auth/admin
It sounds like you want to check a users session via your node backend yes? The documentation here describes how to do that: https://firebase.google.com/docs/auth/admin/verify-id-tokens#node.js
This can work for apps that boil down to a well-defined structure. The link you shares basically builds a front end CRUD (create, list/read, update, delete) backed by google sheets (if I got it correctly).
That's a very frequent structure especially for internal tools. For SaaS, in my experience hese tools aren't enough and you still need to do some additional development (eg. users/authorization, specific business logic like recommendations or calculations, etc), but can still be used for early prototyping.
Open-ended solutions (you get a lot out of the box but can still extend it with code in some way) are better in those cases. For example Firebase (no-code backend), API Bakery (low-code backend) handle the backend but you still need to provide the frontend, Shoutem handles mobile but you still need an API.
I think the most underappreciated no-code SaaS platform is WordPress :-)
Add a scheduled Cloud Function. This function checks the price every X minutes and sends it to you.
The easiest start with Functions is via Firebase Functions.
Here are tutorials which are basically exactly the business logic you need:
Looks like you have a collection of movies and you add a document with an id of user.uid to this collection. Because the id is always the same for the same user you end up replacing the document. So your data structure only allows for storing one movie per user.
You could try to add a movie with a unique id each time and store user's id as a property of the document, e.g.
m_id: movie.id,name: movie.name || movie.original_name,
Or make movies a subcollection of users. See https://firebase.google.com/docs/firestore/manage-data/structure-data
When you deploy your function, they are dockerized into separate container images. Suppose you have 2 functions and when you deploy those functions each of those functions has a copy of your functions directory. They both are converted into separate docker images and stored in container registry. While building these images they consume your Cloud Build minutes, it's free up to 120 minutes/day but the container registry (a special type of storage bucket used to store built docker images) is not free and charges around $0.26/GB.
You can see the pricing at: https://firebase.google.com/pricing
So when deploying your function you'll be charged for the storage cost of container registry and the storage bandwidth consumed equal to the size of those docker images.
Suppose if you've deployed an onUserCreate function in us-central1 then you can see your container image in Cloud Storage through Google Cloud Console. You'll see a storage bucket with name something like gcf-sources-******-us-central1, open this bucket and you should see all container images built for your deployed functions. Do not delete this bucket as Cloud Functions API handles this for you.
To view storage buckets in Google Cloud Console, visit: https://console.cloud.google.com/storage/browser
There's an official document from Firebase explaining how to set up Firebase hosting.
You might want to go through this.
You're going to want a Firestore trigger (onCreate) that watches for new users (represented as documents). Then in the code handling the trigger (i.e. cloud function) you'll want something that works with the GKE API to spin up a new pod. A new pod per user sounds expensive to me but I have no idea what your use case is so maybe it's reasonable.
Hi not A computer. You can do what you're after all in on go. Since you are going to be doing a compound query, you'll need to create an index. This will allow you to create the query with multiple where clauses.
You can also specify to order the response as well as limit the response to a specified number of documents. I believe the billed amount should be the number of documents returned by your query. So in your example you should be billed for 10 reads.
Easy quick way is the serverless approach using Firebase or AWS Amplify
Can kind of quickly get past all that nonesense and to the meat of your app, downside being you get tied to the serverless option you chose and would have to refactor to remove it later.
Other options being setting up a backend yourself with like Java/Spring or Node/Express and use something like JWT or LDAP to authenticate.
Simply put, Firestore is newer.
But the longer answer is more complicated. I don’t know much about databases, but my quick research before I started developing my app showed me that Firebase uses a newer security model, and it is easier to scale. If I remember correctly, RTDB requires distributing your Data amongst multiple DBs after 100k connections. I am building a pretty large app so I didn’t wanna deal with scalability and stuff.
I honestly went with the easiest and the newest solution, and Firestore is just that. I am pretty bad with anything databases, but firestore has been super easy. I have multiple realtime connections and initial tests with around 150 users showed that my shitty code with Firestore can handle it pretty well. I will conduct a bigger test in about two months. That’ll give me more info. But so far so good.
This page will give you more info.
Cloud functions and the admin SDK aren't necessary to have a secure and complex application that is only an SPA. For example, you can limit queries based on who created the record, limit reads based on user ids within an array on the document, limit document creation to only those who are authenticated, and more by securing your Firestore data with rules. There is a similar rules for using the realtime database.
Those rules get you very far. But payments for example are something you'll need to create a function for as you will have private tokens used to submit payments.
Are you using firebase auth as well? Since that should do this for you anyway.
Otherwise you may have some success looking in this direction or this one.
I don't use REST, and I don't use react-native-firebase. I use the firebase SDK directly in React Native (and React and NodeJS) and I am very happy with my choice.
You want to store photos in Cloud Storage: https://firebase.google.com/docs/storage/android/start
Don't get that confused with Cloud Firestore. Cloud Firestore is an alternate version of the Realtime Database that's in beta right now.
When you take a photo, you'll want to upload to Cloud Storage and get the URL of the photo. Then you want to create an object in the Realtime Database with metadata about the photo. Example:
"name": "my photo name",
"grade": "grade 12",
"class": "computer class",
The guides recommend a flat database hierarchy to avoid fetching too much data at once, but your project is due in 2 days so it's not the highest priority right now.
Thanks for the great blog post Pier!
On using the local emulator: did you give the functions shell a try? https://firebase.google.com/docs/functions/local-emulator#invoke_realtime_database_functions While it's not as simple to invoke e.g. RTDB/Firestore functions as the HTTP emulator, I find that I catch many problems before deploying with it.
Btw: I use cron-job.org for trigger functions based on time. While still not as good as having them built-in, it is definitely easier than setting up an app engine instance. :-)
So I'm not sure what I am doing wrong but I can't seem to get versioning right. I tried compiling my app today (with no changes) and kept getting the following error:
Program type already present: com.google.android.gms.internal.measurement.zzwp
I then see this post about updating SDK versioning. Updated the Google Services dependency in the project Gradle file from 3.1.2 to 3.2.1. Then upgraded the relevant Firebase dependencies using the new individual versioning from here. Now the issue is that Android Studio fails to resolve a lot of those dependencies _unless_ I revert back to 3.1.2. And even then, my Google Maps dependency fails to resolve.
I understand that changes and upgrades need to be made but this has been more frustrating than helpful. At the very least, I should have been able to compile using my old unchanged code. And I'm not the ony one facing this issue -- take a look at the visitor statistics for this particular SO post.
Edit: It seems that 3.2.0 is the stable version since all of the other recent versions (3.1.2, 3.2.1, 3.3.0) throw one compilation error or another.
The link /u/ene__im provided is great to start (always read the documentation!).
My suggestion is, when you ask a question, to include the resources that you have studied so far, what you have tried, a sample of your code.
It is nearly impossible to help someone from a complete zero, and most of the times whatever knowledge we can give you, it will be hard to retain as it's not part of a bigger learning process.
If you learn better/faster from example, https://firebase.google.com/docs/samples/ is a good starting point. Good luck.
Obviously different companies will use different technologies, but I'd bet a fair amount use Firebase Cloud Messaging (formally known as Google Cloud Messaging).
At least on Android, there is a connection to the Firebase Cloud Messaging (FCM) that all apps on the device share. When a transaction occurs, your bank might send the FCM servers a request to display a notification on your phone. The FCM servers will then use that connection from their servers to your device to send a very small message to your phone.
| Bank | ---> | FCM | ---> | Phone |
This message is probably even smaller then this Reddit post. Just a couple bytes (1 byte = eight 0s and 1s). Since it is so small compared to a movie (which can be several gigabytes, 1 gb = 8000000000 ones and zeros) the message can basically be received instantly, and in just one message (movies have to be split into thousands of smaller messages to and from the server).
The time it takes the message to physically reach your device is very very small to humans. Worst case it would take a second, normal case probably 100 milliseconds.
The author is actually correct.
>There are also SDKs that are installed in apps to provide analytics and data about activity. Prominent examples include Google, InMobi and Facebook.
Google also just announced their new Google Assistant SDK today.
Firebase also referes to their software as SDK's
Google also calls its Google Mobile Ads an SDK.
Hey ForSprint09, you can actually use Firebase's Auth/Real-Time Database with Expo. You can't use Firebase's Storage however, due to it requiring you to use Blob files which isn't supported in RN yet, but there is a PR being upstreamed to provide Blob support.
Here are the docs for using Firebase with Expo: https://docs.expo.io/versions/latest/guides/using-firebase.html and here are the JS Firebase Auth docs: https://firebase.google.com/docs/auth/
One caveat regarding the Firebase Auth JS SDK, you can not use phone auth with a React-Native (Expo) project since it can't handle the ReCAPTCHA/Verfifer methods out-of-the-box.
Using Firebase Realtime is tricky though, you have to be careful to structure the data in a way so that you aren't pulling a node and deep hierarchies of children. The result is that you may have to denormalize more than typical. More info https://firebase.google.com/docs/database/web/structure-data
Firebase has hosting now..
Powerful cdn, custom domain and ssl handled automatically..
Updating is a breeze.. Just type 'firebase deploy' once you are done with changes .
Lastly you get to use firebase too which has a generous free plan. I have been using it for https://searchera.io
Take a look at Firebase Realtime DB here - https://firebase.google.com/docs/database/
If you want to use the classic DB + Rest API approach, it'll be good as well (except for polling, avoid polling as much as possible). But you'll have to use things like websockets and FCM ( the Successor to GCM) in addition to it.
Edit: link to FCM - https://firebase.google.com/docs/cloud-messaging/
I'd say it's more likely back-end jobs will dry up before front-end ones. Not only are sites like Wix or systems like WordPress giving you wysiwyg and interface builders, they're also giving you the backend for free, there are TONS of code-free back-end services like Firebase for instance which allow a company to hire front-end devs to build the part of their application that really needs to be custom, the branding. Most websites/webapps don't need custom backend. The vast majority of web apps / websites are simple CRUD apps and need little to no customization in the backend. But almost all of them need custom branding / user experience.
So I think cheap freelancer websites might get eaten up by Wix or WordPress, which to be honest, they already have been. But now front-end devs are either customizing wordpress templates or working in slightly bigger companies that do need custom UX and branding. I imagine this won't change.
Essentially I think the cheap and mundane websites are going to be eaten up by "automation", but it will then make it so the jobs that will actually need the devs will be much more interesting, creative and innovative projects which will end up making that career path much more rewarding.
You're right in that Google sheets were not designed to be a backend for an application (even though you could make it work).
I would look into Firebase. It was built to solve this problem and works really well.
Firebase test lab is $5 per device hour, straight from the "source"
AWS Device Farm the first 250 device minutes are free, then $0.17/minute (~$10/hr) or $250 for a single device for the whole month unlimited access. Also provides remote access for manual testing on devices you don't own.
Edit: Firebase pricing
Why not just calculate the leaderboard rankings when requested, and cache your firebase function output so that it doesn't have to do the full calculation for each request. https://firebase.google.com/docs/hosting/manage-cache
You have a couple of different questions here. First, firestore does support storing geographical data as its own type, but this is a geohash and the documentation specifically says that they recommend storing lat/long instead.
https://firebase.google.com/docs/firestore/manage-data/data-types. You'll probably want to store lat/long.
There's some surprising math around handling lat/long correctly when doing any math on them, but if your users are in the same general area you can probably gloss over that. Look up Haversine if you're curious.
Your second question is about notifications. Since this is not a publicly facing app, this is less important but I'd recommend against sending device tokens to other users. Instead, do this on the server side with a firebase callable function. Cloud messaging is absolutely the right solution to actually send the messages.
Yes, you should update the device token on each login.
There is verifybeforeupdateemail: Sends a verification email to a new email address. The user's email will be updated to the new one after being verified.
I’m using it with Vue.js v3 and I have no issues at all. And instead of watch somebody else, why not just dig in the official docs? https://firebase.google.com/docs/guides
Ps: do you sure you installed the Firebase dependencies?
Edit: fix docs link
firebase.firestore.Timestamp.fromDate receives a Date obj
firebase.firestore.Timestamp.fromMillis receives a number
Spend some time reading the docs or youtube guides, Firestore / Firebase has solutions for all of these things that are straight forward to implement.
Deny all read / write to Firestore, and just use the Admin SDK on your Cloud Function to communicate. https://firebase.google.com/docs/reference/admin
It's not so much about the amount of users but what they do. Google has a calculator and examples. Btw I have 5 MAU and 0$ Bill 😋
Just one should be enough
"Simultaneous responses sent from a single database. ~100,000/second"
So I'm assuming you're saving the likes somewhere in a Firebase database. If so, yes this is possible. The high level overview is something like this...
There's a high level overview of the process here, and a more detailed example (that I haven't tried myself) here.
One project per environment. Three firebase projects in total: dev, stage, prod; each having its own resources.
Firebase hosting supports multiple hosting targets. Main app, admin app, reports app are to be deployed to firebase hosting.
You can use a pub/sub function to run a function periodically. See the Scheduled Function section.
Then within the function, you can do the fetching and use the admin sdk to write the data to firestore.
As for authentication an data management, firebase is your way to go. With firebase Authentication Sdk you get a very easy to use library for all authentication related stuff, including login with google, username & password as well as steady to ship login interface.
Next, you want to store data for each User. You can use firebase firestore Sdk. It's a nosql database, which means you don't need to know sql (although learning sql is always a good idea). Instead you save plain json objects (your serialized data classes).
For your app you should consider (in case you didn't plan yet) to use mvvm and repository pattern.
You will probably also want an admin app / website to edit Userdata or delete users.
Hope it helps and happy coding
Ps: the scope for your project is perfect! Don't add any more features for release 1.0
You can use Pub/Sub and Cloud Scheduler to run functions on a schedule. Something as simple as functions.pubsub.schedule('every 1 days').onRun. It handles everything for you behind that.
functions.pubsub.schedule('every 1 days').onRun.
The code itself is simple. You can either construct a Date object with your unix timestamp (with a little math converting it to milliseconds), or use a library like date-fns. Something like the differenceInDays function there. Get the difference between your date and today. If it's >30, delete. That's the easy part.
You're comparing methods in two different SDKs.
Firstly, auth().updateProfile() is actually auth().currentUser.updateProfile(). It's a method on User, not a top-level auth method. It's for allowing users to update their own profile information within your client app.
auth().updateUser() is a method provided by the Firebase Admin SDK, which runs on the backend, not in the client app. It's for writing backend code that also updates a user's profile. Since it runs on a secure backend, it allows administrative code to make changes to anyone's profile. It also has the ability to disable the account entirely.
According to what I've learned about GDPR from numerous sources and webinars, any data that can be linked to an individual with no matter how much effort is considered PII. Let's take advertising ID for example — it's not linked to an actual user profile, yet since it allows to collect a picture about a person's interests, search history, geo locations etc over time from different sources and combine it into a single profile, it is technically possible to determine which person this data attributes to, hence it is customary by GDPR to ask consent about targeted advertising now. Same goes for anonymous analytics ID. So yeah, something as clearly identifying your user as a user ID is totally PII.
UPD: Read the rules, there are some conflicting terms. E.g. here it says
> You will not facilitate the merging of personally-identifiable information with non-personally identifiable information unless you have robust notice of, and the user's prior affirmative (i.e., opt-in) consent to, that merger.
meaning that as long as this is disclosed and the user gives consent, you can merge PII with analytics, while here it says:
> You will not, and will not assist or permit any third party to, pass information to Google that Google could use or recognize as personally identifiable information.
However, there's this method FirebaseAnalytics.setUserId(String)
You might as well use Firebase Crashlytics: https://firebase.google.com/docs/crashlytics/
I can't see Google keeping the old Fabric Crashlytics around for much longer now that they're offering a migration path.
You don't need a full database for this, you could store your points in a JSON file and put it in an S3 bucket. Alternatively you could use https://developer.apple.com/icloud/cloudkit/ or https://firebase.google.com which are both managed backends that are easy to set up.
You need to use a older version of the storage library.
As stated here:
"Cloud Storage version 16.0.1"
>Removed the deprecated StorageMetadata.getDownloadUrl() and UploadTask.TaskSnapshot.getDownloadUrl() methods. To get a current download URL, use StorageReference.getDownloadUr().
My recommendation would be to use Firebase Admin. You'll have elevated privileges so you can do what you need to do, while closing off your storage or database rules to outsiders.
Firebase essentially runs the equivalent of this command to verify the TXT records:
dig -t txt +noall +answer yourdomain.com
If you get the expected results when you run this, wait for a few more hours. If verification doesn't continue after that, reach out to Firebase support for personalized help in troubleshooting.