Let's say I have an array in a node server at IP xx.xx.xx, let's call it mobile server because only mobile users can access it:
var users = [{username: "jim", stats: "x"}]
Now I have another node server at IP yy.yy.yy, for PC users only.
I want user "jim" to be able to access his user through HTTP requests from his PC and his mobile aswell, but also modify his object whenever he makes changes in one of the devices. is it possible to achieve, performance-wise and security-wise?
Yes, this is possible. You would want both node servers to access the same db for simplicity. You can use any database, nosql (mongodb) or a traditional sql one (mysql, postgresql, etc).
Related
I have a constructed DB that have a structure I need. I works with this by using Neo4j Desktop. Now I've deployed an app what works with my db in local network, but can't work from eternal networks. Now I need to fix it but I can't find any info about that.
When I've tried to connect to db via address http://localhost:PORT from my phone connected to same network I didn't got anything related to db.
I tried to add some settings in neo4j.conf file such as org.neo4j.server.webserver.address=0.0.0.0 and dbms.connector.http.address=0.0.0.0:7474.
Also I have a DDNS but I don't know how can I use it to connect to my db.
I'm expecting that I can connect to my db from any network.
How does one go about uploading a database like Apache Cassandra after creating one? Furthermore, is there a way to upload/share only its skeleton structure, without the data gathered in it? I'm on MacOS and would like to use Python to do all of this. Thank you!
Based on your second comment, I guessed it to mean you want the database to be remotely accessible to clients/apps not installed locally.
Clients/apps connect to Cassandra on the IP address set for rpc_address and the CQL port set for native_transport_port (default is 9042) set in cassandra.yaml.
You mentioned that your Cassandra instance is running on your laptop so only clients/apps running on your local network can access it if you configure rpc_address to an IP address accessible on the network (default is localhost).
If you're just trying out Cassandra and want to collaborate with other developer friends, try Astra and launch Cassandra instance on the free-tier (no credit card required). With it you can share the database credentials with your friends and they can connect to it over the internet.
You can connect to Astra from your Python app using the Python driver. Otherwise, Astra includes Stargate.io pre-configured and ready to use. Stargate is a data access gateway that lets you connect to Cassandra from your app using REST API, GraphQL API or JSON/Doc API without having to learn CQL. For more info, see Connecting to your Astra database. Cheers!
I would like to connect my SQL Database on Siteground Hosting to Power BI through the SQL Server connection. However, I need to get the following information which I am not sure where to get:
Siteground Database Credentials in the format: servername:portname
Username & Password (which I have)
And finally, when I inserted the IP Address in item no.1, the error received is as below:
Based on the error above, I figured it could be either:
(i) the IP address I have inserted is wrong; or
(ii) I need to allow remote access to my database on Siteground CPanel:
If item (ii) is the reason for the error, in order to allow PowerBI to access the database, I would need to insert the IP Address of my PowerBI Online which I do not know how to get
I need assistance basically connecting my PowerBI application to my SQL Database created on my hosting account Siteground
Any help is much appreciated.
Your Siteground control panel suggest that the database is MySQL - your are trying to connect to a SQL Server database. They are not the same thing which is probably why it doesn't work.
Try using the MySQL connector for Power BI
First, as Martin Cairney told you, the connector that you are using is wrong - Microsoft SQL Server and MySQL are completely different products, which are not compatible. First change the connector.
The list of IP addresses is something dynamic. There is no guarantee, that Power BI will try to connect to your database from a single IP address only, nor that this IP address will stay the same for a long time. If you go this way, you should maintain this on a weekly basis and monitor for changes. The list of IP addresses can be downloaded from these json files:
Public: https://www.microsoft.com/en-us/download/details.aspx?id=56519
US Gov: http://www.microsoft.com/en-us/download/details.aspx?id=57063
Germany: http://www.microsoft.com/en-us/download/details.aspx?id=57064
China: http://www.microsoft.com/en-us/download/details.aspx?id=57062
They are updated weekly.
Better solution is to move your database to Azure (e.g. Azure MySQL service or MySQL installed in Virtual Machine in Azure) or to migrate to another data source.
Let's say there are two databases customer1 and customer2, and I want to use one codebase to access them i.e connect to a database based on the URL.
www.example.com/customer1/dashboard would connect to customer1.
www.example.com/customer2/dashboard would connect to customer2.
What is the proper way to do this?
Do I name the database the same as the URL parameter, and then pass that parameter to the connection bit, or is there a better way?
(Sorry, I don't know exactly should I ask this question here in stackoverflow or other related sites. please move it if isn't appropriate)
There are some unrelated groups of students which each group members produce data together. each member use his credentials to login to the client desktop application and send data to the server. other group members should see new data if they login with their credentials.
The problem comes in when I want to make the client works although there was an error in connection to the server. I don't want to stop them if they couldn't connect to server, so they make data and later will send it to server.
here is the problem, without connecting to the server, how can I make memberships in the client and be sure he really belongs to the group, or how can I know other member has new data in the local machine so his collegues can see it?
I don't want to use another local server, just a remote server and a local machine with database.
If the server is unavailable, the only way to know if a person is in a group is if you have that information stored on the client. Of course, someone could be removed from a group and the (disconnected) client does not know it.
Solving this would depend on how your system is used.
If membership does not change very often, you could use the client-saved membership as long as it is not too old (e.g. use it if it is less than 4 hours old, or some such rule).
Whenever the client re-connects to the server, it should ensure that its local data is refreshed if it older than N-hours
In addition, when the connection is re-established, and the data is sent to the server, the server should check once more. if the user has been removed from a group, the server can reject the data