Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I've created a java application for our POS project and tried using heliohost.org as my domain server to sync all the data from different branches and uploaded my MySQL database in it. I've successfully connected it, and my application can access the database without any problem. However, when using the domain server there is additional latency -- when I add a product or login to my application it takes a couple of seconds before it carries out the action.
Any tips or other method to sync data from other branches to just 1 database?
Location, Resources and Load concerning the DNS server; this are the
factors that increases or decrease the performance of your DNS server.
Try to optimize this factor.
If you want full speed use your IP itself to connect to the DB server,
this will eliminate the DNS resolution time.
You can also use cloudflare or similar DNS service; they are both
fast and secure (I think it is free also).
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I want to build an E learning app using Java. The GUI will be made using JavaFX and for database I will use MySQL. So far application runs fine on localhost. But I want the application to be multi user. I m a little confused because I ve read different options like client/server and RMI. What would be the best approach in this case? For example, if the database is on another computer, and several clients will run the app (the app will contain both GUI part and database operations part via JDBC) is it ok? Or do I need to separate client part (like GUI) from actual database operations (Server part)? What about RMI? Does it make sense to use RMI in this case?
In the database the app will store user credentials and user progress. I will grateful if someone could help me clarify this
I would NOT recommend exposing the DB to the Internet.
I would recommand implementing an REST-API for the Communication between DB and Client (JavaFX GUI). The big advantage is that you can control which operations can be executed against the DB and which not. I dont now about RIM btw.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Basically, i used react.js for the front end and node.js/express.js as backend to be able to store and access data from my database(mySQL). I also used JAVA springboot to create my own api to fetch data from external sources such as JIRA with basic authentication. I was wondering if this is a good ‘structure’ in order to fetch data from jira, display it in a table and store it in my database. Now my other queston is, i run 3 local host servers to make this function, if i want to deploy and put all this in a web server would it make me need 3 servers running ? I’ve never deployed anything so my main concern is that. Thank you
I think you can put things simple and easy for you by choosing one language/framework for all your back-end process. Between NodeJs/Express and Java/Spring you can choose what you really like and are more comfortable with. Because definitely what you can do with one you can almost do it with the other. It is just a question of choice if there is no requirement.
About the second question, do you mean 3 physical servers ? It is possible to run all your three apps on the same physical server. You just have to set a specific port for each one.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I wrote a Java program to populate a Database. Currently I run the program on the server and populate the database on the server.
Now I need to run the program locally, and populate the databases in multiple servers. (It is the same database on all servers).
How would I approach this, and does java allow me to connect to a server to run the code then disconnect then repeat with another server?
For example is there a way to connect via via ssh, then disconnect and connect to another server via ssh and repeat the run of the program?
Given you connect to the database using JDCB, you likely use a connection string comparable to this one:
jdbc:mysql://localhost:3306/dbname
Probably you don't specify localhost or the port number, in which case your connection string would look like this:
jdbc:mysql://dbname
In such a case, the default host (being localist) and default port would be used.
To connect to a database on a different server, you would specify the IP address or the server's host name in the connection string:
jdbc:mysql://123.123.123.123:3306/dbname
jdbc:mysql://my-db-server.com:3306/dbname
You could create multiple instances of java.sql.Connection, one for each database you want to connect to.
http://docs.oracle.com/javase/tutorial/jdbc/basics/connecting.html
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I am to programming so please help me in some issues.
I download app from Google play that filter web searches. If URL in blacklist then redirect to this webpage localhost:50099/block.html
My query is how to connect this local server?
It is likely that the app you are running has its own internal web-server. If you see that address in the navigation address bar of the app you are running then you may not be able to access it outside of the app.
Are you browsing the web from inside the app itself? What are you trying to accomplish? If you want to access an internal web-server running on an android device which is open to other apps, then you should be able to access it using the URL you noted. I have seen light weight web-servers internal to apps in both conditions, only accessible internally within the app and accessible outside of the app.
UPDATE: Since your question is now 'How to create a lightweight HTTP server on Android':
Try this: HTTPD
It is very simple to use, eg:
NanoHTTPD serverObj = new NanoHTTPD(50099,new File("."));
use IP address of your machine instead of localost in url eg :-
http://192.168.1.190:50099/block.html
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to design a software in java. I have a client program in my personal computer which is located in a LAN. In other pcs of this LAN server application has been installed. So the image of my system is like this:
Ok, in this system servers have not same port , because some ports may close in each system, these servers just listen to a connection after finding an open port , as well Client doesn't know their IP, but as I mentioned all of these servers and client program are located in a LAN, picture of client program is some thing like this:
When I click the Scan NetWork Button , Client should find all of the listener servers in network , what should I do in this case? Is it possible to find all listener servers with a client in a network with cause I'm new to networking.
What you probably want is some kind of zero-configuration networking instead, like Bonjour/Zeroconf or SSDP. There are several Java implementations for both, as well as lots of native implementations on almost all OS.
They both solve your problem of finding the servers without knowing their IPs or ports.