I'm developing a desktop JavaFX application that connects to a local WildFly app server via the REST protocol. WildFly describes itself as an
application runtime that helps you build amazing applications.
and the way I view WildFly is for development use only, so when I eventually want to deploy my app to the public, I'll need to migrate my program to an application server on "the cloud" so to speak, such as AWS, Google Cloud Engine, or a simple Digital Ocean droplet (seems best bet).
However, the post here says WildFly can be used commercially so now I'm totally confused about the typical architecture I should use when deploying a (commercial) java app to the public. I assume a Droplet is just a server which can take different roles (app server, DB server, etc.) ... effectively replacing WildFly. If so, won't I need to install some software on the Droplet to effectively make it an app server? Do I install WildFly on it?
What is a common, effective architecture for the following setup:
I own a domain, ex: www.mysite.com which contains a download link for my Java software. A user clicks the link and it downloads the software. Once it's on their PC, the program can communicate via REST with the endpoints on my app server via the REST protocol. Both my site and the java app need to have access to the user database, which I assume can be accessed from either using REST requests. Some sort of caching will be needed like Redis too.
My guess: The website domain can be hosted anywhere, such as iPage.com, and the Java application (client-side code) is hosted as a file for download on iPage's server. The java app's server-side code should be hosted by Digital Ocean or similar, which provides REST endpoints for the client-side code to communicate with. The database server will also provide endpoints for both the website and the app. I assume Redis should be integrated in my app-server code somehow?
Whether the app server and database server will be together or separated is up for debate, but I'm seeking clarification on a standard, proper approach for my needs.
-
That's not usually what "helps you build" means.Stack Exchange Broke The Law– Stack Exchange Broke The Law2018年04月20日 05:13:32 +00:00Commented Apr 20, 2018 at 5:13
1 Answer 1
Your JavaFX desktop application can make REST calls to your Wildfly application server (which is an application server formerly known as JBoss, developed by Red Hat and which is a commercially viable solution) which could be located in the cloud along with your database. You can also build a RESTful web service (within your database) that will allow the access to your database for your JavaFX application. Not sure what database you are using so here is an example tutorial to get you started.
Preferably, for security and performance reasons, your application server and database sever should be on separate servers or containers. You can talk to your cloud provider on how you might set this up in their cloud environment.
I hope I've understood your dilemma accurately.
-
thanks for the feedback. I had to do some research to understand the difference between a web service, and an application server as I mentioned. You said WildFly can be "located in the cloud along with your database"... but how do I do that? For instance, do I purchase a Droplet server, and simply install WildFly and ta-da, it's become an app server? Why would you suggest I need a web service instead of a simple app server that accepts REST requests? I also assume my web host doesn't necessarily need to be on the Droplet, but can be a third-party provider(?). Thanks again.Mathomatic– Mathomatic2017年12月21日 19:33:09 +00:00Commented Dec 21, 2017 at 19:33
-
1For instance, do I purchase a Droplet server, and simply install WildFly and ta-da, it's become an app server? In short, Yes. Why would you suggest I need a web service instead of a simple app server that accepts REST requests? I was just suggesting one way to handle your architecture issue.tale852150– tale8521502017年12月21日 20:01:59 +00:00Commented Dec 21, 2017 at 20:01
-
I also assume my web host doesn't necessarily need to be on the Droplet, but can be a third-party provider(?). You can go with many hosting companies. You mentioned Redis so take a look at Heroku - heroku.com/redistale852150– tale8521502017年12月21日 20:03:29 +00:00Commented Dec 21, 2017 at 20:03
-
@Mathomatic - if you’ve found this answer and comments helpful or correct, please mark the answer as such. Thank you.tale852150– tale8521502018年01月21日 04:16:22 +00:00Commented Jan 21, 2018 at 4:16
-
@ tale852150, sorry for the massive delay :( Voted you correct.Mathomatic– Mathomatic2018年06月05日 19:27:35 +00:00Commented Jun 5, 2018 at 19:27
Explore related questions
See similar questions with these tags.