Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
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  
  AIO4J = better NIO?  (Read 1495 times)
0 Members and 1 Guest are viewing this topic.
Offline Matlu

Junior Member




Hasta La Victoria Siempre!


« Posted 2005-07-24 23:18:05 »

there is one thing which I did not like about NIO since very beginning. Its interface is too cumbersome when you want to use it for game programming. I guess that most people need fire&forget. You want to create a message and call one method, which will post it. You don't want to bother with waiting till the socket is ready for writing, and then bother with checking whether it was really sent or not.

Searching on internet I found that there is "competitive" implementation - AIO4J from IBM. I haven't seen their interface yet, but they say it uses different paradigm to achieve same thing. Anybody tried it by any chance? Smiley

Interesting link: http://www.theserverside.com/news/thread.tss?thread_id=26732
Interesting quote:
Quote
As others have pointed out, this is not a replacement for NIO. It actually seems to be an implementation of (at least portions of) JSR 203. In pattern speak, NIO enables the Reactor pattern, while asynchronous IO enables the Proactor pattern. See POSA2. JSR 203 was originally supposed to be part of JDK 1.5, but did not make it. It will be part of a future implementation.
Quote
As Bruce points out above, AIO is a different paradigm to NIO (which is multiplexed non-blocking serial IO). The platform support for AIO in many operating systems enables scalability beyond that afforded by NIO for handling thousands of simultaneous connections with low thread count.

AIO is not intended to usurp NIO. AIO4J is regular Java and JNI code that will run on any compliant 1.4 JVM.

Multiplayer Online Games
http://www.duelboard.com
Offline Jeff

JGO Coder




Got any cats?


« Reply #1 - Posted 2005-07-25 04:49:59 »

there is one thing which I did not like about NIO since very beginning. Its interface is too cumbersome when you want to use it for game programming. I guess that most people need fire&forget. You want to create a message and call one method, which will post it. You don't want to bother with waiting till the socket is ready for writing, and then bother with checking whether it was really sent or not.

Searching on internet I found that there is "competitive" implementation - AIO4J from IBM. I haven't seen their interface yet, but they say it uses different paradigm to achieve same thing. Anybody tried it by any chance? Smiley

Nope, but I question the need for ANY of this in game clients.  They dont generally have enough sockers open simultaneously for it to matter much.  (ANd if they DO its generally a bad mis-design... like the way EQ  opens a different UDP socket for each communication partner. Silly and wasteful of resources.)

Servers are a different story.  Until this becoems aprt of a JDK release, i myself would be wary of it because ist one more third party port I have to count on being avaiable if I shift platforms and I havet had any problems with NIO.   That may or may not matter to you.


Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #2 - Posted 2005-07-25 11:14:22 »

there is one thing which I did not like about NIO since very beginning. Its interface is too cumbersome when you want to use it for game programming. I guess that most people need fire&forget. You want to create a message and call one method, which will post it. You don't want to bother with waiting till the socket is ready for writing, and then bother with checking whether it was really sent or not.

Yes, you do. You want to do your entire game in one thread, for a myriad of reasons. You don't have to, but it makes life easier. So, in fact, you want to do exactly what NIO does for you.

Game programming is ALWAYS more cumbersome than normal programming, coming all the way back to that annoying gameloop thingy Wink - it *enforces* a more cumbersome programming style. Fundamentally, it's forcing you to do non-transparent scheduling, whereas modern programming generally uses transparent scheduling.

Quote
Nope, but I question the need for ANY of this in game clients.

Yeah, not worth it for performance reasons, but for code readability and reasoning as noted above...

malloc will be first against the wall when the revolution comes...
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.

Riven (18 views)
2014-07-29 18:09:19

Riven (13 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (31 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (41 views)
2014-07-23 21:16:32

Riven (28 views)
2014-07-23 21:07:15

Riven (29 views)
2014-07-23 20:56:16

ctomni231 (60 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!