Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

asynchronous i/o

Posted on 2003-11-07
5
Medium Priority
?
241 Views
Last Modified: 2012-06-21
I'm making a simple chat program where the client sends a message to the server which the server redirects it back to all the connected clients.   In particular, I'm using the java .nio package (buffers and channels) and want to know if asynchronous i/o is a must in this case (since dealing with readings and writings of data).   Suppose even if its not mandatory, is it going to be critical if I'm going to build a larger program using this as a base?   Any comments are appreciated.  
0
Comment
Question by:skyblue01
  • 3
  • 2
5 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 200 total points
ID: 9703765
>>and want to know if asynchronous i/o is a must in this case

Certainly not. This sort of thing was going on long before nio came out and still is going on ;-)

What makes you think you need it?
0
 

Author Comment

by:skyblue01
ID: 9703811
Oh okay.   But if I want ot make a network connection in the real-time environment, wouldn't it be critical spawning multiple threads and not having asynchronous i/o?   Also all the sample codes I've seen uses this feature and mine doesn't so I was wondering if I was doing something very inefficient...
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9704049
>>.   But if I want ot make a network connection in the real-time environment, wouldn't it be critical spawning multiple threads and not having asynchronous i/o?  

Well, i'm not sure what you're doing (you didn't mention that above), so i can't really answer that...
0
 

Author Comment

by:skyblue01
ID: 9704320
CEHJ thanks for your suggestion.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9704343
:-)
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question