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
Related
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 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 recently learned about Docker and from a press release that Google App Engine supports it.
The question is,
Does it mean that we can now "package" our app using Docker (may it contain non-GAE white-listed jars) and expect it to work with Google App Engine?
How a docker app can access the Datastore API, the TaskQueue API is there a way, or this question is irrelevant?
If I package with Docker, say, a Spring app that access MongoDB, MySQL or whatever would it work GAE, if yes how come?
Or otherwise if this idea is not correct,
What is the integration of Docker and Google App Engine?
This is part of an ongoing Limited Preview Managed VMs, you can subscribe to it with the following form
Does it mean that we can now "package" our app using Docker (may it contain non-GAE white-listed jars) and expect it to work with Google App Engine?
Yes
How a docker app can access the Datastore API, the TaskQueue API is there a way, or this question is irrelevant?
Using the regular API jars.
If I package with Docker, say, a Spring app that access MongoDB, MySQL or whatever would it work GAE, if yes how come?
Because the underlying container run on a Google Compute Engine VMs, see the Managed VMs documentation referenced earlier for more details.
We want to start a project using spring and mongodb and finally want to deploy it on cloudfoundry. There will be three different applications which should be binded to a mongodb service i.e. all three applications need access to the mongodb database.
Now we want to develop locally (without actually deploying to the cloud) using local mongodb and tomcat,...) since this way we get better debug capabilities, hot deployment, etc... (is this even possible with cloudfoundry?) How can i configure my spring applications in a way that they are using the locally installed mongodb when deployed locally and are binded to the cloudfoundry mongodb service wen deployed in cloudfoundry?
Is this even a good idea to develop/deploy locally and deploy to the cloud at the end?
regards
The envisioned development model for Cloud Foundry based applications is using a so called Micro Cloud Foundry for your local development needs, which currently/usually is a virtual machine (VM) based single node but otherwise complete Cloud Foundry installation 'in a box'.
The only downside of this approach is that (by default) you always need to resort to remote debugging techniques (even when developing locally/offline) rather than e.g. the change code and reload browser approach many dynamic language developers are used to enjoy.
Whether or not this matters largely depends on your development
process, but it is probably fair to say that this approach favors
more elaborate/mature coding techniques based on unit tests, continuous integration etc. - given you specified Java/Spring as your target language/framework you should be well prepared for this ...
Cloud Foundry endpoint targeting
Once you have such a VM in place, you simply need to switch the target Cloud Foundry endpoint and deploy to either one in an otherwise identical fashion, i.e. the Cloud Foundry runtime automatically takes care of binding to the respective services as usual, see e.g. Targeting Cloud Foundry:
Target Cloud Foundry in the Cloud:
prompt$ vmc target api.cloudfoundry.com
Target a standalone a Micro Cloud Foundry running on your local virtual machine:
prompt$ vmc target api.<domain>.cloudfoundry.com
Micro Cloud Foundry variations
Most Cloud Foundry vendors offer a custom variation of such a Micro Cloud Foundry VM, e.g.:
Micro Cloud Foundry
Stackato Micro Cloud
Micro Iron Foundry
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.