Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (775)
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  
  Is Socket IO slower than Netty? (MMO)  (Read 2353 times)
0 Members and 1 Guest are viewing this topic.
Offline nelsongames

Junior Devvie


Medals: 3



« Posted 2018-05-13 00:35:04 »

I'm writing a game that will support multiplayer using LibGDX. HTML is a priority, so I'm forced into using WebSockets (Socket.io library).

My question is, will using Socket.io be a performance problem compared to a framework like Netty?
Offline Riven
Administrator

« JGO Overlord »


Medals: 1356
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1 - Posted 2018-05-21 12:33:21 »

Socket I/O will be the least of your concerns when building a MMO. By the time you have thousands of concurrent tcp-connections, it may play a role.

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

Junior Devvie


Medals: 3



« Reply #2 - Posted 2018-05-24 01:03:56 »

Socket I/O will be the least of your concerns when building a MMO. By the time you have thousands of concurrent tcp-connections, it may play a role.

What are some of the bigger problems that will be faced? :/

I ended up going with a websocket library, as Socket IO didn't support GWT.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven
Administrator

« JGO Overlord »


Medals: 1356
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #3 - Posted 2018-05-24 01:15:49 »

Quote
What are some of the bigger problems that will be faced? :/
Well Smiley Getting to the point where you have a published game, with a thousand concurrent players.

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

Junior Devvie


Medals: 5
Projects: 2



« Reply #4 - Posted 2018-09-06 17:42:27 »

You don't have to use WebSockets, you can use "Transfer-Encoding: chunked" instead.

It's better because it's readable (debuggable) and does not use CPU for parsing WebSocket protocol stuff.

Offline jonjava
« Reply #5 - Posted 2018-09-06 23:09:10 »

You don't have to use WebSockets, you can use "Transfer-Encoding: chunked" instead.

It's better because it's readable (debuggable) and does not use CPU for parsing WebSocket protocol stuff.

Click to Play


Sockets are definitely the way to go if you want low latency and throughput. WebSockets are just Sockets with a HTTP Handshake.

That's not to say that you have to use Sockets. Plenty of things you can achieve with other methods like long-polling etc.

Offline bullen

Junior Devvie


Medals: 5
Projects: 2



« Reply #6 - Posted 2018-09-22 15:06:28 »

Long-polling is not usable for games, because each message from the server kicks in a new request from the client. It just wont scale. But HTTP streaming does scale: http://fuse.rupy.se/about.html

The only thing WebSockets are good at is bandwidth, which is not a problem if you use a event based protocol instead of tick based.

Pages: [1]
  ignore  |  Print  
 
 

 
hadezbladez (45 views)
2018-11-16 13:46:03

hadezbladez (50 views)
2018-11-16 13:41:33

hadezbladez (29 views)
2018-11-16 13:35:35

hadezbladez (20 views)
2018-11-16 13:32:03

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

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

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

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

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

nelsongames (2043 views)
2018-04-24 18:14:32
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!