Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (535)
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 1798 times)
0 Members and 1 Guest are viewing this topic.
Offline jonjava
« Posted 2011-10-23 20: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 Member


Medals: 3



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

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

JGO Kernel


Medals: 145
Projects: 4
Exp: 14 years


Esoteric Software


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

I recommend Linode. Use this link and I get $20: Smiley
http://www.linode.com/?r=96b3cca89283fac6babee9b4de25cdc044a40e14
The pricing is good, especially if you go for two years. They have great documentation here:
http://library.linode.com/

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline jonjava
« Reply #3 - Posted 2011-10-23 23: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: 337
Projects: 2
Exp: 5 years


I'm the King!


« Reply #4 - Posted 2011-10-24 00: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]).

Online Riven
« League of Dukes »

JGO Overlord


Medals: 744
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #5 - Posted 2011-10-24 00: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 Member


Medals: 3



« Reply #6 - Posted 2011-10-24 00: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 18:20:51 »

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

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 18: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 23:02:13 »

I use http://123systems.net/ 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 20: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) @http://www.oderland.se/.

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!
jon

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (11 views)
2014-07-29 18:09:19

Riven (8 views)
2014-07-29 18:08:52

Dwinin (8 views)
2014-07-29 10:59:34

E.R. Fleming (25 views)
2014-07-29 03:07:13

E.R. Fleming (10 views)
2014-07-29 03:06:25

pw (39 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (26 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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
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!