Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Everlong Online
#31
Overhead on objectstreams? Sure, in comparison to datastreams which are essentially just byte arrays, but use of multiple sockets per client and gzip compression streams means your packets are still tiny, and it allows you to implement a fantastically secure and structured object oriented code design.

An uncompressed objectoutputstream running on a single threaded socket is insanely faster (we are talking lightening) than vb6's winsock implementation. Also, by using this method we can simply create a new instance of the object being sent, fire it through a static factory and actually reduce server-side overhead dramatically as objects are being instanciated, dealt with and disposed of bloody quickly.

After coding the entire networking backend both ways, the objectstream design model just has so many advantages and such a tiny speed difference I just have to conclude it is a better way of handling this kind of problem.

Also, datastreams are io blocking on the socket which is fucking mega bad news, object streams are not..

I'm not trying to flame you or anything, I genuinely went out and wanted to find the best possible way of writing the networking for a java powered mmo. Just sharing my experiences.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)