Java integrated SQL server - java

I'm working on a plugin for an emulator that is going to allow people to host a control panel through a website to view statistics, etc; Currently I have XAMPP installed which is running my SQL Server, and the HTTP Server is being handled through the Netty networking library in Java.
I'm curious as to if there is a way to host the SQL Server from within Java, similar to the HTTP Server. It'd also greatly simplify the process of installation for the plugin.
The other option was to use ObjectDB, but after looking into it, it seems like it requires Quercus and I don't want to go through that.

The term you're looking for is "embedded database".
There are a number of databases that you can use as an embedded database, and you can choose to use them as an in-memory database (which means the data is gone when your application stops) or make them save data to a file on disk, so that the data is still there when you stop and re-start the application.
Examples of databases that can be used in this way: H2 Database, HSQLDB, Apache Derby.

Related

How would I implement an embedded SFTP Server on Openshift

Background Context:
Due to enterprise limitations, an uncooperative 3rd party vendor, and a lack of internal tools, this approach has been deemed most desirable. I am fully aware that there are easier ways to do this, but that decision is a couple of pay grades away from my hands, and I'm not about to fund new development efforts out of my own pocket.
Problem:
We need to send an internal file to an external vendor. The team responsible for these types of files only transfers with SFTP, while our vendor only accepts files via REST API calls. The idea we came up with (considering the above constraints) was to use our OpenShift environment to host a "middle-man" SFTP server (running from a jar file) that will hit the vendor's API after our team sends it the file.
I have learned that if we want to get SFTP to work with OpenShift we need to set up of our cluster and pods with an ingress/external IP. This looks promising, but due to enterprise bureaucracy, I'm waiting for the OpenShift admins to make the required changes before I can see if this works, and I'm running out of time.
Questions:
Is this approach even possible with the technologies involved? Am I on the right track?
Are there other configuration options I should be using instead of what I explained above?
Are there any clever ways in which an SFTP client can send a file via HTTP request? So instead of running an embedded SFTP server, we could just set up a web service instead (this is what our infrastructure supports and prefers).
References:
https://docs.openshift.com/container-platform/4.5/networking/configuring_ingress_cluster_traffic/configuring-externalip.html
https://docs.openshift.com/container-platform/4.5/networking/configuring_ingress_cluster_traffic/configuring-ingress-cluster-traffic-service-external-ip.html#configuring-ingress-cluster-traffic-service-external-ip
That's totally possible, I have done it in the past as well with OpenShift 3.10. The approach to use externalIPs is the right way.

Java Application Deploying With SQL Server Database

I developed a java swing application by using hibernate connection and MS SQL server for database. Application is working fine. And I know the way to create and EXE and the installer for application.My question is, how I install this application to another computer with database. Should I install the SQL server on that computer or is there any way to use the db without installing the whole SQL server in that computer.
As far as i know there is no way of using database without installing the SQL Server, unless you configure in a way that the application will communicate with the db on your pc, but that's complicated
A different approach to this would be for you to make a view in the database and extract the data you need to a csv file, include that file in the resources folder of the application and then use Lucene to query over it
Take a look at how to get started: here
When you need to update the data in the file you can release updates for the application that would include these changes in the csv file/s

Where can I deploy my java REST webservice for free so that I can access it remotely?

I have developed a REST web-service in Java interacting with a MySQL database.I want to deploy the web-service and the create a database at a server so that I can invoke it from an application.I tried Microsoft Azure but was unable to get it done.Where can I find relevant information for this?
I had similar problems with a MySQL database using the third party option in the Azure Marketplace from ClearDb. What I ended up doing was switching my database from a MySQL instance to an Azure Database Instance (Subset of SQL Server's features.) This worked perfectly for me! I was able to query from my database feed data to my api, and access the API through my Azure Web App.
I understand this may not be an option for you, however, Digital Ocean is a great cloud hosting option (with scaling similar to Azure, although not as good in my honest opinion.) You can set up a Linux Environment with a MySQL Server and JVM and serve your whole API through there. Best of Luck!
#coderden, According to your description, I think you have been deployed your Java Application on an Azure WebApp. Then when you created a MySQL database on Azure for connection from the Java webapp, please make sure the webapp & mysql instance created in a same resource group and note the connection string of MySQL on Azure.
As reference, please see the article to try again although it's for PHP, the steps are the same for Java.

Database server for a simple java desktop application

I want to ask best server for a simple desktop java application.
Please suggest me a server using which i can port my database files on another computer.
can i have an option of MYSQL server 5.1.
in which i develop my application and then i can easily port it to another computer as it is with database.
Not really sure about your application requirements, but for simple application look at embedded databases like Apache Derby.
MySQL and really any other database are also quite straightforward to transfer via data dump/load. In case of MySQL even the data files copy will work.

Java Database with PHP support

I'm looking for a java database server that has support for database to be shared and opened from a PHP web application and a java application simultaneuosly.
I found Apache Derby and H2 Database but they don't have a clear support for PHP application.
Please suggest.
It must be a Java Database Server, since we are planning that we may have to distribute the applications to customers, so we need something portable and redistributable.
Most popular databases have drivers for PHP and for Java.
They also support concurrent connections. Choosing something like SQL Server, Oracle, MySql, Postgres will work just fine.
MySQL might work fine for you. I've used it myself in projects where I both need to access it from java and PHP.

Categories

Resources