Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  [SOLVED] Hosting java servers (?)  (Read 4073 times)
0 Members and 1 Guest are viewing this topic.
Offline jonjava
« Posted 2011-10-23 18:29:33 »

Hello hello,

I've been looking into how to go about hosting Server that your Applications can "talk" to. I'd like to ask if Java Servlets have anything to do with this? Since after spending lots of time on learning Java servlets, JSP and XML etc I'm having the suspicion that these are only used for the web and basically just a form of MySQL databasing for Java ( aka slow ). Am I wrong? The reason I looked into these was because I googled 'Java hosting' and tons of sites came up providing Java JSP and servlet support and hosting. I'm thinking I'm going the wrong way about this.

What I normally do is create an application, like any other basically, that simply listens for incoming connection at a port on a given IP. That is, I host my servers myself on my own computer with my own IP. Now this is fine for testing purposes. But I wanted to know how to host it in "real life". So I figured Java Servlets had an answer. But now I'm thinking that's not quite right. Are there sites that are willing to host your Java Applications ( servers ) for a price? What are these sites called? What are the protocols of doing so? Or does the answer lie in Java Servlet hosting??

I used to think you could basically upload your Application ( read: server ) to your website and have your games connect to it that way, and this is what Java Servlets are for ( I think ) but the capabilities of hosting on a simple "website" are basically limited to simple MySQL.

TL;DR: If I've created a Server for my Application/Game that I can host on my own computer, how would I be able to host it on the web (at a price)?

Any advice?

Offline Waterwolf

Junior Devvie

Medals: 3

« Reply #1 - Posted 2011-10-23 18:39:15 »

You should probably get a VPS for that. Using JSP for fast paced multiplayer is a bad idea
Offline Nate

« JGO Bitwise Duke »

Medals: 167
Projects: 4
Exp: 14 years

Esoteric Software

« Reply #2 - Posted 2011-10-23 19:55:32 »

I recommend Linode. Use this link and I get $20: Smiley
The pricing is good, especially if you go for two years. They have great documentation here:

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline jonjava
« Reply #3 - Posted 2011-10-23 21:52:17 »

A VPS you say, hmm.

Taking a quick look around these VPS are usually Linux or Windows based. Can the Java programs run on these as a standard? I mean they need to have Java installed and be capable of running the JVM. Or do you explicitly need to look for VPS that provide this functionality for Java?

Since these VPS Renting plands are largely RAM limitation based - what is the minimum RAM requirement for the JVM to run smoothly?

Offline ra4king

JGO Kernel

Medals: 508
Projects: 3
Exp: 5 years

I'm the King!

« Reply #4 - Posted 2011-10-23 22:23:41 »

If you go with Linux, 500-1000MB should be fine. Windows will need at least 1-2GB.
However, it mostly depends on how much data you store in memory (and really, if you need more than 100-200MB for the application alone then you're doing it wrong [tm]).

Offline Riven

« JGO Overlord »

Medals: 1341
Projects: 4
Exp: 16 years

Hand over your head.

« Reply #5 - Posted 2011-10-23 22:27:46 »

You can easily run Java on a 128MB VPS. It depends (as always) on the application whether you need more.

A VPS means you're getting root-access, so you can do anything with it, including installing Java.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings!
Offline Chromanoid

Junior Devvie

Medals: 3

« Reply #6 - Posted 2011-10-23 22:38:09 »

I would say servlets are good for http based communication Smiley. Many social games use JSON, webservices and stuff from the web development world. For parts of the game with soft realtime requirements servers like SmartFoxServer are widely used.

Maybe you can use Rackspace's cloud servers for running your software. 9$ per month and 0.18$ per GB is rather cheap. I recently successfully ran JBullet with ~300 spheres and some kind of marble run level on the smallest instance type. I connected 100 Clients with ~13kb/s downstream. It ran quite smoothly.
I think there are also higher level solutions (Keyword: PaaS, see Heroku, Google AppEngine, CloudBees, OpenShift)...
Offline h3ckboy

JGO Coder

Medals: 5

« Reply #7 - Posted 2011-10-24 16:20:51 »

If you are a cheepo like me, then I would recommend

while you do get a slightly wonky domain, uc an run a server any size u want, because all it does is just provide u a dns for your (likely) changing ip adress. Also a thought is that if you are needing it for a server to run java games on, then it is likely the user won't even know the server name.

enjoy Smiley
Offline JL235

JGO Coder

Medals: 10

« Reply #8 - Posted 2011-10-24 16:44:45 »

Taking a quick look around these VPS are usually Linux or Windows based. Can the Java programs run on these as a standard?
Yes, both OS's are very well supported by Java, and can run Java to a high standard.

Of the two I would recommend Linux, because:
  • Windows VPS typically costs more, and the cost isn't worth it, unless you _must_ use Windows.
  • Base install of Linux typically has a smaller footprint then a base Windows install (although this is less of an issue today, and custom Windows Server installs/setups can be made to be pretty slim).
  • A real website often relies on other software living around it, and generally these always support Linux first, and Windows second (Ruby is a good example).
  • Lots of website related setup guides are written for Linux.

I mean they need to have Java installed and be capable of running the JVM. Or do you explicitly need to look for VPS that provide this functionality for Java?
A VPS won't provide you with Java. Instead it provides an OS, and you install Java yourself on top of it, and set it up to be a web server. This is the downside of using a VPS, because your setting up the whole server yourself, from the ground up. This even includes things like backups (although VPS providers often include backups services, for a price).

If you know what you are doing, then a VPS is a _much_ more powerful option then buying shared hosting. The biggest plus is that you are able to get the setup you want, since you have total control. You typically get more performance then a shared host, and because of the added control, you can also optimize your website/application to run in a way that makes it run at it's best. For example on my VPS I have two webservers; one for handling PHP, and one for handling static content (namely images, CSS, JavaScript and html files). As a result it runs faster!

I also use Linode, and highly recommend it. I have used several shared hosting sites and have had issues with all of them (even the good ones). I have never had an issue with Linode. There was also a VPS performance benchmark blog post done a year or two ago, where Linode came out on top. I know many web developers who also use Linode, and find it to be excellent.

Offline Eli Delventhal

JGO Kernel

Medals: 42
Projects: 11
Exp: 10 years

Game Engineer

« Reply #9 - Posted 2011-10-24 21:02:13 »

I use it's cheap and pretty reliable.

See my work:
OTC Software
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline jonjava
« Reply #10 - Posted 2011-10-30 19:19:26 »

Very useful and enlightening information in this thread, thank you for such good answers.

I opted for a VPS provider a bit closer to home (Sweden) @

I've tried it out now for a week or so and have been delighted on its performance, even though it's only on a small 128MB Ram.

It's running on a minimal Debian OS. I installed java 1.6u29 on it manually - which wasn't as straightforward at first because the download links oracle provides can't simply be "wget"ed. So I just zipped my java folder and put it on mediafire and downloaded it with wget that way.

And then I simply added its path to the environment variable. So basic unix knowledge is needed but it's actually really simple and straightforward. And I had my server applications running in no time.

Thanks everyone for your help!

Pages: [1]
  ignore  |  Print  

EgonOlsen (77 views)
2018-06-10 19:43:48

EgonOlsen (57 views)
2018-06-10 19:43:44

EgonOlsen (77 views)
2018-06-10 19:43:20

DesertCoockie (259 views)
2018-05-13 18:23:11

nelsongames (157 views)
2018-04-24 18:15:36

nelsongames (156 views)
2018-04-24 18:14:32

ivj94 (897 views)
2018-03-24 14:47:39

ivj94 (161 views)
2018-03-24 14:46:31

ivj94 (810 views)
2018-03-24 14:43:53

Solater (174 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!