Alternative (cloud) deployment options for a console application - java

I have a fairly large console application written in Java 7 that manages a fair amount of our order processing.
The application consumes a number of web services for orders, interfaces with a database and inserts data into an ERP system. The requirements of the application specified no user interaction, so Java EE was not considered during project planning.
That being said, one of the initiatives this year is to look to the cloud for ways to eliminate cost and improve efficiency. As such I am trying to determine if a console based application can be deployed to a cloud service such as OpenShift or Heroku with little to no changes.
So, the question is: Can a Java console application be deployed to a cloud service or application server with little to no changes?
--Edit--
As mentioned below it is possible, but how? What resources should I look at to deploy a jar console application to an application server and have it run successfully?

yes it can be , atleast I tried the same with Jelastic and it worked quite well.
Please check the http://jelastic.com/docs/standalone-application for more details

Related

How to use Docker with Tomcat?

I´m trying to get more familiar with Docker because everyone talks about it and everyone loves it. I know how Docker works in general, but I don´t understand how to used it in practice.
In my case, I have several web applications running on Tomcat. As far as I understand, it´s common to have one Docker container per application. But what does that mean in my case?
Should I have several containers each running Tomcat which in turn runs one web application? Or would I have only one container with Tomcat where all web applications are deployed on?
Understand why you will dockerise all your applications which are running in single tomcat instances ?
Lets say if your tomcat goes down then all your application will go down. So
Docker with microservices is the trend which tells a docker container should not have mutiple applications running i.e single resposibilty model.Avoid one container being responsible for multiple aspects of your overall application.
What will happen if you put all your applications in single docker ?
Availability : if container goes down all application will go down. Example : If you have ecommerce application and if offers service goes down then you should be able to do other stuff other that checking offers.
Deployment : If you need to deploy an application then all application will go down. for example : if you want to deploy offers update would it be correct to stop all running users which may be doing payments or other stuff?
Application Load and scaling :Lets say you have the modules, Payment, offers and shipping. I would expect the offer module will have more load than all others. So we can horizotal scale the offers service. But if we would have all application in single container then all application will be scaled which waste of resources.
Refer a nicely written nginx tech blog : https://www.nginx.com/blog/introduction-to-microservices/
Let me know if you have any questions more to ask. feel free to add comment.
Generally, it is better to run a Tomcat Docker Container for each .war app with filebeat or any other log shipping program in conjunction with single or fewer frontend containers. So 2 Frontend Web Containers for High Availability with 4 Tomcat Containers each serving a Tomcat app.

Distribution and periodic update of a web application

I have been asked to develop a web based application which would be locally deployed at multiple (>100) geographical locations. Till now, I have been designing web applications which are deployed at a cloud and accessed by clients across the globe. In this particular project, the client wants to maintain there own local servers since they cannot ensure continous Internet connectivity. These local deployments may periodically synchronize data with the central datacenter.
Now, I am pondering if it is possible to provide a packaged solution for deploying the complete stack of our web application, so that a technical person at the client end can just download it on the linux box and the packaged solution configures everything (including application server, database, schemas). Additionally, I should also be able to push periodic updates for code etc.
I had a look at Docker, but I am not sure if it is able to fulfill all these requirements or if there is a standard protocol/solution for this which I can build upon.
My web application stack includes
Postgres
JBoss
Class files etc.
JDK
Other dependencies for these softwares.

convert weblogic admin server into managed server

I'm currently having 2 Weblogic admin servers in 2 different domains created on the same machine.
I want to convert one of the admin server to a managed server and then use them together to deploy a Java application. Is this feasible? If yes, how?
I'm currently using Weblogic Server 10.3.
PS: I'm quite new to Weblogic domain creation and administration. Please revert for any more details needed.
The simple answer is no, however, adding a managed server to a domain is extremely simple. See the documentation here. When deploying your application you'll need to target both servers or create a cluster (also very easy), add both machines to it and give the cluster name as the target.
Note, it is generally not concidered best practice to target applications to the Admin server (although it's fine when you're developing on your local machine). If you have the resources available on your environment, you could create two managed servers and put them in a cluster. Depending on the configuration of your Admin server, you may be able to reduce it's size if memory is tight.

seamless redeploy for java web application

I am working at a startup, we are just about to roll out our first beta. Knowing that we will be having a good number of users, we want to have seamlessly deployment when we are adding new features.
I have worked with windows azure before, and I know they support seamless deployment, so I did some googling and cloudbees was the first result.
So the question is, with what we have now (geronimo server, rackspace hosting), is it possible to seamlessly redeploy a java web application? If so, how?
Are there other alternative solution, such as using another hosting provider or use a different web server? (Because it is a startup, it would be beneficial if the answer keeps scalability in mind)
If with a seamless redeploy, you mean an upgrade of your application without any downtime or restarting of your server, LiveRebel might be something to look at.
See http://zeroturnaround.com/liverebel
There are a lot of methods for doing this in the java world. If you don't use sessions (or use shared sessions between app servers) you can do a rolling stop/deploy/start of your appservers, taking 1 offline at a time and using a load balancer to ensure that traffic goes to the other servers.
I have heard Glassfish has such feature, the reference probably ment this (Glassfish 3.x redeploy command) : http://docs.oracle.com/cd/E19798-01/821-1758/6nmnj7q1h/index.html

Java deployment to a cloud for fast computation

I have an application written in Java that performs some straightforward but time consuming calculations analysing some texts, printing results to the terminal. I want to speed up the process by deploying that application on a cloud and letting it be calculated there. Which cloud service allows for such deployment with minimal change of code?
Most cloud computing servers are designed to host web applications (Servlets mostly). I'm guessing your application is not a web application. You could write a simple web application that wraps around your application and uses some kind of messaging layer to distribute the load. You could then deploy on any of the major cloud sites (e.g. GAE, AWS, CloudFoundry).
Alternatively, you can find an existing cloud framework such as Amazon MapReduce (link is to a ppt describing the tool) and fit your application into that framework. This would probably be the fastest approach, especially if you don't have much experience with Servlets.

Categories