Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (773)
Games in Android Showcase (230)
games submitted by our members
Games in WIP (856)
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  
  Kryonet hosting? Where and how?  (Read 24027 times)
0 Members and 1 Guest are viewing this topic.
Offline javansejongens
« Posted 2016-04-11 19:32:57 »

It's kinda embarrassing how I'm littering this forum but ah well, it's not like I wasn't trying this on my own since this morning.

I have a game that consists of a java "Server" using kryonet. With the server on my laptop and router forwarding, everything works fine (client is an android phone, communicates with the server via mobile internet, not wlan/lan).

How do I get this thing online? I've looked at and tried a whole bunch of approaches, the closest I came was on heroku but there I'm seemingly unable to make up the correct Procfile (I got as far as deploying my application on there, but without the correct Procfile command it won't even try to start).

I feel I'm conceptually missing something, obviously I'm not the brightest guy around but if it's so easy to run locally, can it really be this hard to just upload my project as is (git is fine) and then it'll simply run as if the host were my laptop?  I basically only need a computer that has java installed, right?

Hosting doesn't have to be free but I definitely only need whatever the lowest tier is anywhere as I'm only testing stuff.
Offline Riven
Administrator

« JGO Overlord »


Medals: 1356
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1 - Posted 2016-04-11 19:37:00 »

AWS EC2 has a free tier: 750 CPU hours / month for the first year (months with 31 days have 744 hours).

Digital Ocean is nice for cheap but sturdy VPSes.

Linode is slightly higher end, has lots of scripts for you to configure your server with a few clicks.



Those are bare bones Linux boxes though. You'd have to do some sys-admin to get everything to work nicely.
I have no experiences with 'push to deploy' hosters especially for anything else than services running on web-containers (tomcat, jboss, etc) - that may be tricky.


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

JGO Wizard


Medals: 145
Exp: 18 years


Computers can do that?


« Reply #2 - Posted 2016-04-11 20:01:39 »

EC2: Holy crap a free Tier. I missed that.

Linode: slightly higher end? lol first time i ever heard that. I have used them ages ago. I had problems, the upshot was that i got refunded all my money about 3 months later.

What ever hosting you find. You will need to do a bit of configuration. However it is not that hard.

So on a clean linux (a virtual thing, looks like you own computer but with really low ram and and HDD), all you need is java as you say, just install the JRE. I install my own JRE even if they provide one. Master of my own demise and all that. Typically you want to have an account that is very locked down that you server will run as. Then just run the server from that account. Put it in the background or use something like screen if you want to logging without proper login Cheesy.

That suffices to get you off the ground. But for production with uptime requirements you will need to muck in and get dirty with many more details and how things fall over etc. But at this point just logging back on and checking the logs works fine.

Just be aware that you can burn through your bandwidth and cpu allocations much faster than you think.

I have no special talents. I am only passionately curious.--Albert Einstein
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline VaTTeRGeR
« Reply #3 - Posted 2016-04-11 20:11:15 »

I use Digital Ocean, you pay per hour + an hour rate for setup.
This is very useful for testing, since you don't have to pay the 5/10/20€ up front if you just want to run some testing;
Instead you can do it for as low as a couple cents if you only need the server for a few hours.

You have to submit one 5€ payment tho before you can begin if i remember right.

There are also coupons online that give you ~10€ credit for free, this basically means ~3 months linux server for just 5€.

A one core solution for 5€/Month has roughly the single thread performance of my q9650. They do not like/allow maxing out the CPU all day tho.
Tested it with KryoNet, no problem at all! You need to manually install java 8 tho, it's not in their package index last time i checked.
(They have OpenJDK 7 ready to use)

Running your server is as simple as uploading it via sftp and running it from command line like you do on linux.

Can recommend!
Offline javansejongens
« Reply #4 - Posted 2016-04-11 20:18:03 »

Wow this Forum is great! I'll check out DO, paid them their $5 fee already, but couldn't SSH in because the droplet wasn't responding? Too tired to do more today, but am hopeful it will work tomorrow.
Offline Riven
Administrator

« JGO Overlord »


Medals: 1356
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #5 - Posted 2016-04-11 20:40:23 »

Linode: slightly higher end? lol first time i ever heard that.
Compared to Digital Ocean Pointing

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

JGO Wizard


Medals: 145
Exp: 18 years


Computers can do that?


« Reply #6 - Posted 2016-04-11 21:07:49 »

It seems they all do hourly billing now. Interesting. Not that i would bother with that. The main reason i use these services is to have a 24/7 server somewhere else. Like run my company website from there and that sort of thing.

I have no special talents. I am only passionately curious.--Albert Einstein
Offline javansejongens
« Reply #7 - Posted 2016-04-11 21:50:34 »

Got it working on digitalocean, couldn't sleep and had to try it. Was way easier than the supposedly easier sites like heroku for sure.
Thanks and good night everyone, I have a feeling it won't be long  Grin
Offline Catharsis

JGO Ninja


Medals: 75
Projects: 1
Exp: 21 years


TyphonRT rocks!


« Reply #8 - Posted 2016-04-11 22:01:17 »

>Got it working on digitalocean

Excellent... If / when you move toward production you might want to consider the container direction. Docker being the current solution folks are talking a lot about.

I'm looking at putting together a combination of Rkt (https://coreos.com/rkt/), Kubernetes (http://kubernetes.io/), and Rancher (http://rancher.com/) for server deployment for web and mobile apps primarily, but of course it'd be fine for desktop apps too. I'll definitely make a post on JGO if I get all the tooling working well.

Check out the TyphonRT Video Suite:
http://www.typhonvideo.com/

Founder & Principal Architect; TyphonRT, Inc.
http://www.typhonrt.org/
http://www.egrsoftware.com/
https://plus.google.com/u/0/+MichaelLeahy/
Offline CommanderKeith
« Reply #9 - Posted 2016-04-12 06:51:24 »

I use ramnode and have been impressed with how cheap it is at $5 per month with 2 cores.
https://www.ramnode.com/vps.php
Also, in the last few years I've never had to restart the server. I guess that's Linux and Java stability.

Sounds like you're using libgdx, but if you end up running tomcat for a website, Java melody is very handy
http://javamelody.googlecode.com/


Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline javansejongens
« Reply #10 - Posted 2016-04-12 07:29:37 »

Thanks again everyone for all the suggestions.

Catharsis,

Yes I will definitely look into it again at some point in the future, looking forward to your post.
For now I'm happy as everything is working, I'm confident future me will be better equipped to deal with this headache, somehow he always is.
Pages: [1]
  ignore  |  Print  
 
 

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

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

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

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

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

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

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

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

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

Solater (1078 views)
2018-03-17 05:04:08
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
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!