1

I need to execute a java simulation program for a very long time, many hours or maybe days, and i wish i could do it on a server. I've been heard about Cloud Computing, and i'm searching a free platform, or a very cheap one.

For example, i found Oracle Cloud, but i am open to any type of solution.

On the link there are several points to follow to deploy an application, it seems a bit complicated and you also have to install Maven.

Do you think there is a simpler solution, or that this one could be my best try?

I mean, my program consists on a few .class files, i wish i could edit/compile/run the main class very easily, like with a kind of shell or cmd. Unfortunately, i know very little about web programming, so i don't know even if this would be possible.

However, assuming i can launch my program, and log in after a very long time, will i be able to read the results? Or is it possible to write a text file to read the results later?

12
  • Will your main run indefinitely, or you have to run your program in definite intervals? Commented Oct 12, 2017 at 9:02
  • 1
    Also, I would suggest AWS-Beanstalk to deploy your app (using Tomcat) Commented Oct 12, 2017 at 9:02
  • @Sridhar My main method will run indefinetily, until all calculations are done, i don't need any time of timer or scheduling Commented Oct 12, 2017 at 9:07
  • Good. You can use any server (physical/cloud) running linux. You can compile your program as a runnable jar & run the jar in background. Like, java -jar my_app.jar [parameters] & Commented Oct 12, 2017 at 9:09
  • Also, you can use screen configurations, to create a new screen, run your jar, disconnect it, and can resume anytime to see progress. Commented Oct 12, 2017 at 9:10

1 Answer 1

2

i wish i could do it on a server. I've been heard about Cloud Computing

A possible solution is using AWS Lambda. You only provide your Java code in a ZIP file and it will run in a "server-less" environment. What this means is that you don't have to setup a server yourself instead AWS will manage everything for you.

i'm searching a free platform, or a very cheap one.

It's not for free, but it's pretty cheap though: https://aws.amazon.com/lambda/pricing/

However, assuming i can launch my program, and log in after a very long time, will i be able to read the results? Or is it possible to write a text file to read the results later?

I would not recommend writing it to a text file, instead look at solutions such as S3 Buckets or Elasticsearch with Kibana

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks, i will give it a look!
Do you think that execution time (since seconds are calculated to pay) will be comparable to a jvm running on a "normal" laptop, or it will take much more time?
@AeternaAedes I think the lamba will be faster because your laptop will run a lot of other stuff as well which'll cost resources and the lambda probably scales to your needs
@AeternaAedes When I was learning about lambda these series helped me a lot: youtube.com/watch?v=fSUEk6iMW88 keep in mind that the UI of the lambda interface has changed so some features used in the videos are located somewhere else now

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.