my school projekt task is to develop Issue tracking System. My imagine:
JavaFX desktop client application + Spring 4 server + MYSQL database
I would like to use JDBC to reach datas. How should I do it? Spring server made the queries and after it, the spring server should send the client the serialized data?
Yes it's possible, though you don't need spring in that scenario.
Jdbc client would connect directly to the database over the network.
You would have to expose your database to public tcp connections, and firewalls would have to allow this too.
Other options:
Use a local database, like sqlite , and sync w central db over https using a tool like symmetricds. This gives you offline capabilty.
create a restful api on the server, and have the client get and set data using http.
Related
I have my application in Delphi with MySQL as a database. This is a Desktop application with local Database connected using ADO components.
I have another web application done in PHP and MYSQL.
I want to merge both databases and connect the Delphi application to the cloud MySQL database.
Do I need to put all my logic in PHP scripts and access them from Delphi?
How Delphi to cloud connection can be established?
You can use FireDAC to connect to a database located in the cloud, as soon as your provider allows that connectivity.
But exposing you database to the internet is not the best secure architecture. As you suggest yourself with naming it, a much better architecture is REST. The idea is to write server side software - could be PHP - to accept REST requests from a client, execute it (access the database) and send a reply to the client.
Today's, the REST requests are frequently using JSON to pass requests and receive replies. JSON is supported by Delphi. In short, this is an ASCII representation for object properties.
If accessing the database directly is what you really want, look at this video by Stephen Ball showing how to access an MS-SQL database on Azure cloud. This would be pretty well the same with mySQL.
The idea to access multiple remote mysql databases some 30 in numbers using remote jdbc connection in my java application has been ruled out by the DBA's. No remote connection is permitted to the respective mysql DB. Connection can only be allowed from the local j2ee app servers within the LAN.
Alternatives suggested are :
1) Using a Middle ware Messaging layer which invoke some java at the remote side to provide the database results.
2) Using a Web Service on the remote MySQL database site as these site have J2EE App Servers to return the database query results. However i understand that the JDBC resultset cannot be serialized in a web service call and needs to be handled separately.
As the requirement is that the web service call will be using and SQL Query and the Result is to be returned to the Client. How efficiently this can be achieved.
Thinking of what other options are available.
Regards
Pramod.
I had hosted my site on Azure and my database to azure sql databse but the problem with azure sql database does not support data encryption and for that reason I have to move my sql database to external server.
Now I do not know how I can connect that sql database to azure site?
I found one solution to use service bus but they used WCF console application as a service bus listener which I do not know how to create and host WCF.
I appreciate code sample if anything I need to do in my code or application other than connection string setup.
I am designing the backend of my ios application. The backend has separate database and application server running mysql and django separately in different machines. Till now, I have connected my application server with my database server in simple way: I changed the database host in application server settings to point to remore database server and created a new remote host in database server configuration files allowing remote application server to access the database. All works fine and I have decided to go with this setup for production. Then when I was reading Instagram engineering blog, I saw them mentioning 'Pgbouncer' to pool connection to their postgresql database server. What is the need for something like this? Has this got something to do with only performance, or is this a production friendly approach to use something like this for communication between database and application server. Is my general approach mentioned too amateur?
Your approach is not amateur at all. The purpose of bouncer in your case would be to eliminate connection time that happens on each request django handles. For example, on Heroku, which is hosted on AWS servers, this could eat up 40-50ms of each request.
Now, if you had a master/slave setup or something like that, a connection pool would also provide you a failover functionality (just an example)
I have a hosting account at godaddy ruinning Linux. Is has MySQL. I am creating a J2ME application that runs on android and I was wondering if there is any simpler way to connect from j2me application to my MySQL server?
Is it required to install anything at my server? which I cannot do because of the shared account. Any way to just open the connection, update some data in the MySQL from j2me application?
It is quite simple. You just need to do HTTP application/x-url-form-encoded request on the midlet and set request property to HTTP.POST. Then stream form data as bytes. Receive those post variable using a server side language (i used PHP) like $_POST['var'] and in that server script write MySQL query like insert into .. VALUES.. etc.
I don't know if any DB drivers exist for J2ME. If you can't find them just make layer on the server and implement your own protocol for retrieving data via http or sockets