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)?

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?

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]).

I would say servlets are good for http based communication . 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)...

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.

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.

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.

java-gaming.org 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‑gaming.org