Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (568)
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  
  Game server general questions  (Read 4176 times)
0 Members and 1 Guest are viewing this topic.
Offline intothedeepblue

Junior Newbie





« Posted 2012-05-25 18:14:35 »

Hi!  I was hoping to learn more about how game servers are chosen/implemented.  I understand how to write basic TCP/UDP server/client programs in java.  I'm more interested in how this would be applied in industry to make a functional server.

To make a server accepting clients (with the example of a game perhaps):

1. Do game developers buy/rent servers and simply upload a java program onto it?

2. Is a server for this type of application basically a regular computer just running a java program 24/7?

3. Would Apache Tomcat be used for something like this?  (Basically in my searches I have found things like Tomcat and I don't understand how they fit into the picture.  Does a server run Tomcat which enables you to run your java-server-program?)
Offline ra4king

JGO Kernel


Medals: 347
Projects: 3
Exp: 5 years


I'm the King!


« Reply #1 - Posted 2012-05-25 18:30:16 »

1. If you don't have your own dedicated computer to use a server, then yup that's simply it.

2. Yup Smiley

3. Apache Tomcat is to be used for Java servlets, aka mostly HTTP stuff. If you want to run a custom Java app that listens on its own port, then you don't need Tomcat. You only want a computer that can run Java 24/7 without problems. Wink

Offline intothedeepblue

Junior Newbie





« Reply #2 - Posted 2012-05-25 19:29:21 »

Ah I see, thanks a lot!  That clears things up.

I guess the only advantage of using a real server compared to a dedicated computer would be efficiency then?  I'd imagine that servers would have the OS and stuff stripped down since that is their primary function.  Or are all servers fully functioning computers in essence, easily able to add java (if you wanted to)?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ciaran54

Junior Member


Medals: 4



« Reply #3 - Posted 2012-05-25 19:38:16 »

Big servers are usually much more powerful, with tonnes of ram, loads of CPU cores, and a very fast internet connection. Most of them do also run special linux distros, but I don't think there's anything stopping you from downloading one yourself for a standard desktop, If you want that little extra bit of efficiency, but I'm not sure whether it would benefit you.
Offline UprightPath
« Reply #4 - Posted 2012-05-25 19:47:17 »

Also, keep in mind that many IPS frown on people hosting their own servers without paying for the extra data/setup for it. For a small box, it shouldn't be too much of an issue, but if you expect hundreds of hits a day, it could be an issue.

Offline intothedeepblue

Junior Newbie





« Reply #5 - Posted 2012-05-25 20:55:58 »

Thanks all I think I think it finally makes sense!  Grin

Also thanks for the extra tips those will certainly come in handy
Offline tigeba

Junior Member





« Reply #6 - Posted 2012-05-26 03:18:01 »

Hi!  I was hoping to learn more about how game servers are chosen/implemented.  I understand how to write basic TCP/UDP server/client programs in java.  I'm more interested in how this would be applied in industry to make a functional server.

To make a server accepting clients (with the example of a game perhaps):

1. Do game developers buy/rent servers and simply upload a java program onto it?

2. Is a server for this type of application basically a regular computer just running a java program 24/7?

3. Would Apache Tomcat be used for something like this?  (Basically in my searches I have found things like Tomcat and I don't understand how they fit into the picture.  Does a server run Tomcat which enables you to run your java-server-program?)


1)  Depending on the project and the requirements we might use virtual or dedicated servers.  Some at work some examples might be Amazon EC2, Softlayer.  I have a personal VM on Chunkhost that works great as well.  

2) Yes.  You can probably get a long way during development just hosting on your own home machine if you want to save costs, but at some point you will end up needing dedicated hosting.

3) You could use Tomcat, but for realtime games, I would recommend something like Electroserver 5 which is really designed for making multiplayer games and has support for a variety of client platforms, including Java.

Moderator note: this member is a developer of the advised product.




Offline ReBirth
« Reply #7 - Posted 2012-05-26 03:22:58 »

Electrotank seems good. They are even also support Unity and iFamily.

Offline intothedeepblue

Junior Newbie





« Reply #8 - Posted 2012-05-26 14:44:15 »


3) You could use Tomcat, but for realtime games, I would recommend something like Electroserver 5 http://electrotank.com which is really designed for making multiplayer games and has support for a variety of client platforms, including Java.


Thanks for the advice, but it would be nice if you disclosed your conflict of interest with electrotank.  Especially when consulting a beginner.  Sad
Offline sproingie

JGO Kernel


Medals: 202



« Reply #9 - Posted 2012-05-26 14:47:24 »

It's not a "conflict" of interest so much as merely an interest, and yes that's always a good idea when talking about commercial products.

Electrotank doesn't look like my cup of tea, but it certainly does look interesting.  Never thought I'd see the day when MUD infrastructure would become proper SaaS.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline intothedeepblue

Junior Newbie





« Reply #10 - Posted 2012-05-26 17:25:02 »

It's not a "conflict" of interest so much as merely an interest, and yes that's always a good idea when talking about commercial products.

Electrotank doesn't look like my cup of tea, but it certainly does look interesting.  Never thought I'd see the day when MUD infrastructure would become proper SaaS.


Normally I wouldn't mind recommending a product, but looking through his post history shows that he's a developer or at least affiliated with the company.
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 803
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #11 - Posted 2012-05-26 17:33:17 »

but looking through his post history shows that he's a developer or at least affiliated with the company.
Just look at his profile, where he states his website to be www.electrotank.com


Full disclosure: I'm one of the developers Smiley
IMHO, his shameless plugs are borderline acceptable. I'll leave it at that.

Upon further research, it seemed that 4 out of 4 of his posts in 2012 were plugs to his product. The links have been removed, as JGO will not be abused as a platform to spam. Other than that, the posts are not modified.

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

JGO Kernel


Medals: 202



« Reply #12 - Posted 2012-05-26 17:43:21 »

Normally I wouldn't mind recommending a product, but looking through his post history shows that he's a developer or at least affiliated with the company.

That's what I mean by saying he has an interest.  "Conflict of interest" is a little more loaded, implying something much more adversarial, and he didn't have an existing duty to impartiality ... I'm just nitpicking on shades of meaning here, don't mind me.  Disclosing one's own commercial interests really is still the best policy.
Offline jonjava
« Reply #13 - Posted 2012-05-26 18:09:07 »

I had a hard time painting the picture of what a server really is. It's so simple it's confusing. A Server, low and behold, is a computer.

Your desktop PC or laptop can function as a server - what does that mean "function as a server". It means that your computer of choice is connected to a network (for example, the internet) and that a program is run on that computer that listens for incoming connections (like a java application you've built). That's it.

It doesn't even have to be connected to a network, you can run a server locally and have programs on the same computer talk to each other. ( Which is where 99% of the debugging occurs during development. ).

So what are "webservers"? What does a server that hosts a website look like??

Simple. It's a computer that listens for incoming data, just like ALL servers. What makes it "different" from other servers is how it interprets the data it is being sent and how it responds. Ie, the protocol. You might have heard of HTTP before. It stands for Hypertext Transfer Protocol.

A Protocol is just a fancy word for a set of agreed upon rules people came up with. These rules are vital, because EVERYTHING you send is in bytes, ie, ones 1 and zeroes 0.

1  
01000000


The above bits can be interpreted in lots of ways. It can represent the character '@' or the number '64' for instance, or perhaps a color. Or perhaps the 2 first bits are supposed to represent the x coordinate, the following 2 bits the y coordinate, and the last 4 bits the player score. If we don't know WHAT the bytes are SUPPOSED to represent (What is agreed before-hand), we have NO chance of making sense of it.

What happens when you open up your music player and you try to play an image file? Most likely the music player would complain that it can't make sense of the bytes, or that it needs a codec ( Ie, a set of rules of how bytes are supposed to be read in order to convert it into music ). This is why files are littered with "suffixes" like .mp3 or .gif etc. They're CLUES for the operating system to know which program should be opened to interpret the data. Suffixes have nothing to do with the contents itself. The content in reality is just a bunch of 1's and 0's, no matter if it's music, images, text, movies, whatever.

Try opening a music/image file with notepad (or text editor of choice). That's what you get when you misinterpret bytes.

This is why protocols and a set of agreed upon rules are absolute key in anything computer related. No matter if it's over a network or not.

Now you might think you could host your java servers on a simple webserver or website, but that's probably not the case. Since web hosts come in many different shapes. Some hosts give you access to your very own computer to use ( expensive ), some a virtual machine ( cheaper ) and some gives you only access to common website tasks (limited, cheap)  where you can host a website but you can't actually run any of your own programs/servers (most free/paid website/blog hosting).

My 2 cents.

Offline tigeba

Junior Member





« Reply #14 - Posted 2012-05-29 03:29:31 »


3) You could use Tomcat, but for realtime games, I would recommend something like Electroserver 5 http://electrotank.com which is really designed for making multiplayer games and has support for a variety of client platforms, including Java.


Thanks for the advice, but it would be nice if you disclosed your conflict of interest with electrotank.  Especially when consulting a beginner.  Sad

intothedeepblue,


I just wanted to take a minute to apologize personally if it was in any way unclear that I am one of the developers of Electroserver.  It certainly was not my intention to obscure that.  I generally explicitly mention that if I mention our product but alas, this time i seem to have forgotten to include it.  I believe that information was also available in my profile, but I am not 100% sure there.

In any case, the only reason I mentioned it was because you mentioned Tomcat.  Tomcat is excellent software which I use extensively, but HTTP based servers are generally not the best choice for realtime games.  I am of course making an assumption that you are interested in that type of game.  

Hope that helps!


Edit: removed abnormal amount of whitespace from end of post.
Offline tigeba

Junior Member





« Reply #15 - Posted 2012-05-29 03:35:03 »

but looking through his post history shows that he's a developer or at least affiliated with the company.
Just look at his profile, where he states his website to be www.electrotank.com


Full disclosure: I'm one of the developers Smiley
IMHO, his shameless plugs are borderline acceptable. I'll leave it at that.

Upon further research, it seemed that 4 out of 4 of his posts in 2012 were plugs to his product. The links have been removed, as JGO will not be abused as a platform to spam. Other than that, the posts are not modified.

Riven,

I have no issue with removal of any links.  I have no interest in traffic, links or anything of that nature.  My interest and passion is multiplayer gaming and Java.  I think a review of my entire posting history on JGO  ( instead of last 4 posts ) would make that abundantly clear. 




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.

Pippogeek (40 views)
2014-09-24 16:13:29

Pippogeek (31 views)
2014-09-24 16:12:22

Pippogeek (21 views)
2014-09-24 16:12:06

Grunnt (47 views)
2014-09-23 14:38:19

radar3301 (29 views)
2014-09-21 23:33:17

BurntPizza (65 views)
2014-09-21 02:42:18

BurntPizza (37 views)
2014-09-21 01:30:30

moogie (44 views)
2014-09-21 00:26:15

UprightPath (53 views)
2014-09-20 20:14:06

BurntPizza (55 views)
2014-09-19 03:14:18
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!