Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (753)
Games in Android Showcase (228)
games submitted by our members
Games in WIP (842)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Networking & Multiplayer / Re: 'Server-initiated' communication on: 2003-06-08 13:39:42

... running a servlet on both sides you'll get the same poor performance ...

You're right, it's slow to use a HTTP servlet. I only mentioned the both-sided-servlet approach because rajit_b said they are currently using a servlet - so why throw it all over when it might not be necessary?


If you want fast response times, you absolutely aren't going to get it with servlets or HTTP for that matter.

You don't have to use HTTP for servlets, the servlet spec lets you implement any protocol, i.e HTTP, FTP, HTTPS and your home brewed protocols if you want. But for fast-paced games, all this servlet stuff is definitely overkill and much too slow.

I'd prefer to implement a custom protocol on top of TCP/IP or UDP if speed is of importance.


PS: Is rajit_b still with us? He's so quite...n
2  Game Development / Networking & Multiplayer / Re: 'Server-initiated' communication on: 2003-06-08 07:44:21

... keep an HTTP connection open over port 80 (keep alive http) which is bad.

full ack, persistent HTTP (and HTTP in general) is bad for games which need fast response times.


... clients poll the server at intervals,

IMHO that's no good either:

If there are few messages being sent, this would cause quite a lot of unnecessary traffic because there won't be a message waiting everytime the client polls the server.

If there are many messages sent and the client poll interval is too long, messages could pile up on the server and eventually crash it due to an out of memory error (only in rare cases of course)

I'd prefer some kind of "fire and forget" communication, where the server just writes the message to a stream/whatever and the client gets it instantly.

Just my 2 cents,
3  Game Development / Networking & Multiplayer / Re: 'Server-initiated' communication on: 2003-05-24 15:00:53
Could you explain how you know which clients are "connected" to the servlet? Assuming you call the servlets via HTTP which is stateless, you track clients with a session (cookie or request parameter).

I can think of two ways to let your server carry out stuff to the client:

  • Equip the client application with a servlet itself to handle the incoming data from the server. This would be an overkill, as you would have to bundle your client with a servlet engine.
  • Or you might drop your servlet idea completely in favor of persistent connections and a custom protocol via TCP/UDP - this would also be much faster than the servlet approach.

One major drawback in you client-server design seems to me, that servlets don't do persistent connections (as far as I know): They get a request, service() it and close the connection. This means, you'll always have to open a new connection, which will make it quite hard for you to "achieve quick response/action"  :-/

Pages: [1]
ivj94 (580 views)
2018-03-24 14:47:39

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

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

Solater (60 views)
2018-03-17 05:04:08

nelsongames (107 views)
2018-03-05 17:56:34

Gornova (147 views)
2018-03-02 22:15:33

buddyBro (690 views)
2018-02-28 16:59:18

buddyBro (90 views)
2018-02-28 16:45:17

xxMrPHDxx (492 views)
2017-12-31 17:17:51

xxMrPHDxx (728 views)
2017-12-31 17:15:51
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!