• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

running java on remote server

 
robert peach
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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
 
chan wenbi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • 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 http://www.coderanch.com/how-to/java/ServletsFaq#hosting would be more appropriate. Hard to say from the description, though.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic