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 ?
-
Is it batch? Do you expose TCP/UDP ports? tell us more about the connection with the external world. – guillaume blaquiere Sep 06 '22 at 15:45
-
Consider Google Compute Engine. You can run Linux or Windows applications on a variety of operating systems. – John Hanley Sep 06 '22 at 18:48
1 Answers
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

- 891
- 8
- 27