Manage users with Firebase but store user video in MySQL - mysql

I am developing an Angular app that uses Firebase to manage users. All is working correctly at this point: users are authenticated via Facebook, FB profile pic is displayed when user is logged-in, etc. the goal of the app is to allow users to upload videos and also vote on videos. I have been pondering the idea of possibly using a MySQL database to store user videos (due to limited storage with the free Firebase account) but I am not sure how feasible this would even be. Has anyone had any experience with something of this nature? I've been browsing the web for some time now but haven't found anything related.

You don't store videos and images inside a database, you get a storage server, AWS for example, and then save the url to that file in your database. Firebase would be just fine for that.

Related

Looking for the best way to give users access to a MongoDB database for a limited time

In my react-native app, users can store data in a database specific to their account at MongoDB, which is synchronized via Realm Sync.Now I want the possibility for users to have access to certain data of the user for a certain period of time.
This should work via a website as well as an app, should it be installed.
So I am looking for a solution to the problem that people who get access to data for a certain time are not logged in.
I am happy about any help

How can i make my social network app more efficient in storing and retriving the Data?

I am working on a social network app from scratch,
I designed my database (choosing Mysql) to store and retrieve data
The problem starts when I am posting videos and photos and when data become larger and larger when I am waiting to view news feeds (depending on sql query that brings the last posts from friends ans Pages).
The question is :
How can I manage and handle the big data, and how can I make the news feeds service more efficient ?
What do you think of using (Real-time) Databases from Firebase?
If you're thinking about putting up Firebase as your choice for your database, then there's nothing wrong with that. Firebase realtime database is a very secure and great option.
Firebase gives you functionality like analytics, databases, messaging and crash reporting so you can move quickly and focus on your users.
Firebase is built on Google infrastructure and scales automatically, for even the largest apps.
And on top of that, many great apps do use Firebase as their backend.
I'd say to know more, you can just start with a demo project on Firebase to learn how the things happen with Firebase, and after learning, start using it as backend for your social app.
Just go to Firebase Console and start with your own project. To learn how to use Firebase, do refer Firebase docs and if stuck, StackOverflow is always there.
If you want to get some inner details, I have some repositories on GitHub, that might help you in understanding about Firebase and the security rules and other important things.
Demo App
Firebase Security Rules

App that uses cloud storage provider

I'm in the middle of designing an app that will help manage your life better. I personally like having control of my data. So instead of storing everyone's database on a server that I provide,
I want the user to use their own personal storage through providers like google drive, dropbox, onedrive, etc. The reason for this so that an android app, ios app, desktop app, web app, etc can all be in sync if the database was pointed to that storage provider.
I would like to know a few things if any of you have experience with this:
What would be wrong using this design for storage? Greater chance for apps to be out of sync? Slow performance? Chance of corruption if user messes with database directory?
I couldn't find any articles of an app that uses this method. Does anyone know of any articles on the web or your own personal words on how to go about implementing this?
I would like to hear your thoughts on this and reccomendations.

Saving data using Local Storage

I have been reading up about html localStorage but I've read contradicting information. All I would like to know is if I was to save information using localStorage was the user of that computer be the only person able to access/view the information that they had inputted into a form? Or can it also be viewed by users on different devices?
I am thinking to use local storage in an admin page that many people are allowed to access too, instead of sessions. And all users must be able to edit and view information from different devices and using different login details.
The localStorage is called like that because it can be accessed only locally. So you cannot use it to share the data across different clients. You need to use some server to store the data and provide it to your users.
The localStorage object stores data on the users computer permanently, and that data can only be accesses on the users computer by the same origin or domain name, so if you want shared data you have to use some sort of server side mechanism.

Good idea to use web site database for game server?

Here is what I'm doing. I will have an online game that is a real exe application that clients run. Clients connect to my game server. They will have stats, achievements, and be able to buy various things for which I will use PayPal IPN service.
When a player wants to log on, I must be able to retrieve their profile and information from somewhere. When a player wins a game, the game server must be able to add a point to their profile.
Users will need to be able to access their stats from the Web Site, or from the game itself.
Would it be a good idea to use the MySQL database that comes with the Web Site for everything. In that, the game server would get and set properties through php or something?
Otherwise what might be a better solution? Is there a way for my web site to use a database that is on the game server machine, if so would that be a good idea?
How is this sort of problem usually solved?
Thanks
Where you put the database doesn't really matter. If you already have one and it can handle the load, use it. But for security and general organization, you should create a separate database and user within MySQL for your game score information. The user should only be able to access the game data database. This way your other data in the data base is protected from your web interface to the game data in case of a PHP or SQL vulnerability.
MySQL is defineatly the way to go. I have a current setup in a folder outside of public html called users, when a user registers a subfolder inside users is created along with a mysql entry. I use MySQL for username/pass/DOB/etc. and the user's folder for storing pics, acheivements in XML, and comments.
As for the client, I'm sure you could initialize a invisible web browser to access the page, and then use simple coding to get data from the web browser.
MySQL is a popular choice for persistence. Load up the profile at login and cache the data on the client. Then write the updates back at the end of the session. This is one of the things MySQL/PHP was made for. It is cheap, easy and performs and scales well.