Firebase authentication users - javascript

I want to use the users from MySQL in my PHP application for chatting with each other and using firebase as a datastore. For example, there is a table of the user in PHP myadmin my website is also in PHP and my firebase module is in javascript.
I want to implement a functionality of chatting with real-time response time

You may need to write a NodeJS application top run in the background of your server that reads the MySQL DB and writes to Firebase. The NodeJS Firebase module is very easy to use, so adding to a Realtime DB will be easy.

Related

Which method is better: Python SDK (server side) or JavaScript SDK (client-side) to add to and update cloud firestore?

I have a Django web application with a postgresql database on an AWS server.
I want to keep this database in sync with a nosql cloud firestore database. We're using cloud firestore as the backend for a mobile app.
This means that every form update or new object that is added to the web app needs to be in sync with cloud firestore.
I'm able to update cloud firestore using the Python SDK when each form is submitted via the web app. However, I want to know if this is the best method to keep these two databases in sync. Each time a form is submitted, I have to import the firebase SDK, and then use the methods to update cloud firestore. Obviously, this will take time, but I'm unsure if this method is better, or if using the JavaScript SDK will be better. In essence, which method will perform better?
When you are doing that from python SDK the read and write to cloud fire storage is done from the server means if you have x request and y number of users doing that, your server has to do x*y request to Cloudflare storage. in this case, your transaction from the server will be heavily based on a user basis but you can use admin SDK in python and give only admin to access to DB.
If you want to use js for the same then request will be shared by users and the server will be free but each user should have access to DB write and read, you have to be more careful about authenticating users.
so if its all read requests and user-based filters are done well use from js, if you have doubts on authentications or you don't want to take a risk in that use from python.

How can I access a mongoDB database through javascript in WordPress?

I am aggregating data through different sources and compiling them into a mongoDB database on my computer.
My goal is to then have a wordpress website that then serves up some of that data to visitors through javascript code/dashboards. The MongoDB database will also be continually updated (a few times a week).
Would it be feasible/simple to connect the mongoDB database to the wordpress site, or is there a better way to structure this?
JavaScript, client side, does not directly access a server's database. You would need to use an API of some sort to call the PHP Wordpress script and refresh the page that way. Or, if it only updates a few times a week, just use the JavaScript to notify the user when to refresh the page. PHP should have no problem displaying DB results

Receive PubNub subscribe message and insert MongoDB database

I'm trying to develop a small system with a easy architecture. In this case I have one simulator that generate random data and publish this data on PubNub. Otherwise, i have too two subscribers: one web based dashboard and MongoDB database.
At this moment, I developed the simulator and the dashboard. The next stage is receive the PubNub subscribe data and insert into MongoDB.
My issue is how I can do this remotely? What is the framework that I should use? I saw many tutorials that start MongoDB DB by terminal on local machine, remotely how this works?
Someone can give me a full explication?
Regards,
Note: I use PubNub JS SDK, my dashboard was developed in HTML, CSS and JS

Is it possible to load structure and data to angular-storage(or another storage) from a SQLite file from server?

I think what I'm trying to do is very simple, but I'm having a really bad time trying to search this on the internet. I have this populated sqlite db file in my server, and I want to import its structure and data into my web application. This file is generated from another server-side app in a path which is accessible to the web application.
Your web application should access the database with its proper adapter (depending on the language and the framework) and then provide the data to the front-end as a set of services. It strongly depends on the amount of data and its variability whther you want to serialize all the data at application load time, or just to provide data access using several endpoints (by using the sqlite database as the repository for your application models).
It's not much different from a normal web application, provided you don't want to write on the sqlite database and so consider all your models read-only.

helping inserting entries to Azure DB

Im just starting out using Azure and i have minimal experience with SQL, so I'm a little confused. I set up my Azure Webapp to pull from a Git repository on bitbucket. I successfully linked those two together, and pushes made to bitbucket update my site. What I am having trouble doing is linking my database on Azure to this site, so that I can make data entry forms and insert that info as records onto this database. Im just starting out simple to learn the basics. I have a table names Users with the elements, id(which is set up as IDENTITY so it sequentially creates a unique id number), username, password, and email. I can pull the info from the HTML document and everything just fine, but how do I correctly link my DB and its tables using HTML, js, and azure? Ill post any additional info that will be necessary, i dont even know where to begin on this really.
Ill also add im using Visual Studio for creating tables and entities and most DB management.
Thanks in advance.
How to access your database depends on the database you are using and the server side programming language. From the tags you used in your question I assume you are using the mysql database provided by clear db through the Azure Management Portal. You can not access your database right from JS. As you are using VS I guess you are using asp.net on the server side. If using asp.net this article might help: https://msdn.microsoft.com/en-us/library/ms178371%28v=vs.100%29.aspx
If you created a ms sql database through the SQL Database service in MS Azure you also need to check the firewall settings to allow access from your app.

Categories

Resources