• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

running java on remote server

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have recently written a programme which I hope to run continuously on a remote server so that it can constantly send updated information to my friends (as opposed to running on my home computer non-stop). I have been playing around with using tomcat in eclipse, and I can get my programme to run on localhost.

I'm not overly good at networking etc, so my question is whether it is possible to merely rent a web server and have my programme run continuously (just looped) on it? Then I could connect to the web server from my home computer when I need to make changes to the programme etc. If this is possible, what route should I take?

Cheers
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am sure that you could rent machine as web server. Certainly you are also apply Google App Engine (GAE)to running your application. If you are going to update application, then to redeploy by GAE tools.
 
robert peach
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok I have looked at google app engine as you recommended, it seems to be able to do the job.

I do have a couple of questions regarding it, however. Is it possible, once I have deployed the project to run as a web application, that one of the java classes can run continuously on a loop without the need for a request from a user. The looping program would then constantly update the datastore with an array of information. A java class that allows the user to correspond with the webserver would then be able to collect information from the datastore and use it.

How would I get a program to run continuously without the need of a user request?

Cheers
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For running background jobs check out the java.util.Timer and TimerTask classes. They can be started from a ContextListener (assuming that GAE supports either of these classes - I have no idea).

GAE imposes certain limitations on your web apps, though. Maybe more standard hosting providers like those listed in https://coderanch.com/how-to/java/ServletsFaq#hosting would be more appropriate. Hard to say from the description, though.
 
This one time, at bandcamp, I had relations with a tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic