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.
Related
Is there a way I can make my java application (non web) running in google cloud platform. I can see that Cloud run, App engine and Cloud functions works for Web applications. My application is a Java application that runs a report using Google Ad manager API. Can I run this app in any of the GCP tools ?
Cloud Run is predominantly used for stateless operations (similar to Firebase Functions or AWS Lambda). Ie. a request is sent to the instance, which spins up resources, completes the task then shuts down. It is great for API endpoints that don't store anything in memory.
Another thing to note is that both app engine and cloud run are designed to work with dockerized applications.
From your description, it sounds like you should be using a Compute Engine Instance (A virtual computer). You can clone your git repository into the VM and run it manually. There are also GCP tools that will allow you to run the java executable on a timer.
Compute Engine Instances give you the most flexibility to configure the service you're building to your needs.
See docs for Compute Engine Here
I couldn't find any good example of a worker role for java on azure cloud.
I am writing an amqp publisher jms application for event hubs to simulate large amount of data as a stream. I wanted to run this application on cloud and scale it to produce data according to changing needs.
As I known, Azure plugins for Eclipse is to support the features of Cloud Services few years ago, so you can search many resources like the channel9 videos as #Micah_MSFT said. But now, I found it has removed these features for Cloud Services after I tried to install the plugin in my Eclipse.
There are two old blogs which may be helpful in your scenario.
Deploying Java Applications in Azure
Installing Java Runtime in Azure Cloud Services with Chocolatey
Meanwhile, Microsoft Azure Service Fabric is the next-generation cloud application platform for highly scalable, highly reliable distributed applications, that can be instead of Cloud Service, you can refer to the offical document Learn about the differences between Cloud Services and Service Fabric before migrating applications. to compare them, and there is a tutorial for Java.
Just per my experience, as workaround, there are other simple services which be suitable for generating data by Java on Azure cloud, and that can be scaled.
For using App Services, Continuous WebJobs can be scaled with the number of WebApp instances.
On Azure, Use Batch to run large-scale parallel and high-performance computing (HPC) applications efficiently in the cloud. So you can write a Java Application to produce data and run on Batch service parallelly. There is an offical sample in Java which you can refer to.
So, i have some experience developing Java WebServices.
The problem is, all i do is deploy them to localhost.
My question is:
How can we deploy a WebService to a server other than localhost?
How can i search the web and find the WSDL description for my WebService so that i, or anybody else around the world, can call its services?
If i have it in localhost, nobody else but me on my computer can acess it right?...
Thank you for your time
I don't think you'd want to make an application running in your development environment accessible to anybody else around the world for a variety of reasons. Others on your local network could access your local host via its network hostname, but this isn't users around the world.
Let's discuss your two questions individually:
How can we deploy a WebService to a server other than localhost?
You'll want to establish a server environment that is available (on) as much as possible. If you want to keep using Apache Tomcat, you could sign up with a variety of service providers that host Apache Tomcat applications - there are many who offer tiered pricing based on number and size of pre-configured virtual servers (CPU, memory, disk space, and/or monthly data transfer of the application). You could even sign up with a cloud service provider such as Google Cloud, Amazon Web Services, or Microsoft Azure. All provide the tools to build, provision, and manage virtual server(s) which you would then deploy Tomcat and web service application into. Here's a detailed tutorial on setting up a Tomcat virtual server on Azure. You'd then need to manage those server(s), watch them to see how much they're utilized (which will impact how much they cost you per month, by the way).
If server management isn't what you're looking for - you could also explore "serverless" options such as Google AppEngine or AWS Elastic Beanstalk. In this model, you just upload your WAR file and the hosting service manages things like how many servers are needed to handle all the application SOAP requests your users around the world are making. You'll need to read the specifications for each, as you technically aren't providing Tomcat itself - in Google's example, you're actually running in their own proprietary container, so your app may need some changes depending on what it does.
Depending on what hosting or cloud service provider you select, your "how to deploy" steps vary wildly. On the bright side, all offer tutorials on how to specifically deploy applications into them "their way."
How can i search the web and find the WSDL description for my WebService so that i, or anybody else around the world, can call its services?
Once you've settled on a hosting or cloud services provider and have deployed your application, you'll have a URL to reach it, but you'll need to work on getting the word out. There are some open specifications on (SOAP) web service discovery, but more than likely that's not what you're really looking for. You could also submit your WSDL URL to an online API directory such as ProgrammableWeb or Public APIs.
The simplest way to do-it-yourself would be to run a web site that links to the WSDL, then use search engine optimization techniques to list the site on search engines and make it (and the WSDL it links to) relevant to web searches.
Getting fancier, you can treat your web service as a product via an API Management system. At a high level, this works by hiding the real URL to your web service on its server(s) and instead direct clients to a small website for developers where you document, market, facilitate discovery of your service as well as offer a sign up to use it (so you can track and manage who around the world is using your web service). Clients then consume the web service via separate URL behind what's called an API Gateway. You could charge for access or offer it for free but limit the amount of concurrent requests a client can make - after all, you're likely paying your hosting provider for utilization. Some of the cloud service providers Amazon, Azure, standalone API management vendors such as Apigee, Mashery, and many others.
So it's possible to deploy java web applications to Google App Engine (GAE) but how could I host a standard java app on GAE? I've written an application for my company that have to be running 24/7, the application basically monitors the inbox of a specific email and does the required handling.
Is it possible to port such an app to a web application that can be deployed on GAE? Or is GAE only designed for RESTful apps?
If this is not possible through GAE, should we give Google Compute Engine a look?
It's possible to port this app to GAE, but you'll need to do some additional work - such as setting up a scheduled task using Cron so that the logic of your application would be executed regularly.
With Google Compute Engine, it's likely that you'll be able to simply run the application without many modifications, but you'll likely spend more effort on setting up and maintaining the GCE VM on which your application runs.
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