• Post Reply Bookmark Topic Watch Topic
  • New Topic

ERH - Whats new in the 3rd Edition

 
paul zazzarino
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found an reasonably priced copy of the 2nd edition last year and read it. So what is new in the 3rd edition, what did you drop out of it?
 
Elliotte Rusty Harold
author
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The second edition covered Java 1.3. This edition covers Java 1.4 and 1.5. There's one completely new chapter to describe the most significant development in network programming since readers and writers were introduced in Java 1.1. I refer of course to the new I/O APIs in the java.nio package. The ability to perform non-blocking I/O operations is critical for high-performance network applications, especially servers. It removes one of the last barriers to using Java for network servers. Many other chapters have been updated to take advantage of these new I/O APIs.

There've been lots of other small changes and updates throughout the java.net and supporting packages in Java 1.4 and 1.5, and these are covered here as well. New classes addressed in this edition include CookieHandler, SocketAddress, Proxy, NetworkInterface, and URI. IPv6 has become a reality, and is now covered extensively. Many other methods have been added to existing classes in the last two releases of Java, and these are discussed in the relevant chapters.

As to what's been dropped out, I removed one chapter on the network methods of java.applet.Applet that really wasn't very interesting and didn't reflect modern styles of programming. I cut out everything that was only relevant to Java 1.0 and quite a lot that focused on idiosyncracies of Java 1.1 through 1.3. I've also rewritten large parts of the book to reflect changing fashions in Java programming in general and network programming in particular. Applets and CGI programs are emphasized much less. In their place, you'll find more generic discussion of remote code execution and server-side environments, however implemented.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mr.Elliotte,

The ability to perform non-blocking I/O operations is critical for high-performance network applications, especially servers. It removes one of the last barriers to using Java for network servers.

Do you mean the listener-based approach? I have never used such non-blocking technique for server receiving the incoming requests. I have the second edition on my bookshelf now. I read that book, when I was in Network Programming class of my B.S.C.S. I used only blocking technique for server to wait for the client requests. Is the new chapter in third edition discuss the non-blocking issue?

As to what's been dropped out, I removed one chapter on the network methods of java.applet.Applet that really wasn't very interesting and didn't reflect modern styles of programming.

Yes you are right. Applet seems to be non-popular nowadays. So you just replace the new chapter into this applet chapter.


I found the RMI topic in the second edition a bit difficult to understand. Do you update the RMI topic explanation also? Thanks...
 
paul zazzarino
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks ERH!,

I greatly enjoyed the book. I also figured you would have to start hacking material out of it as it would weight too much.

I have not done to much with the Java networking classes but did successfully come up with a nice generic RMI model to use for data collection from handhelds to PC servers. The Jeode JVM offers alot more than that other "ahem" language. Not sure why they left out reflection, serializtion and "local validation" and "remoting"(RMI) but over time it will become more embellished.

cheers!
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by paul zazzarino:
The Jeode JVM offers alot more than that other "ahem" language. Not sure why they left out reflection, serializtion and "local validation" and "remoting"(RMI) but over time it will become more embellished.


I think there should be some kinda reasons that those features cannot fit into their language designs. But I believe that so-called "ahem" language got some kinda similar features which are analogous to those reflection, serializtion and "local validation" and "remoting"(RMI) of Java...
 
Elliotte Rusty Harold
author
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Non-blocking I/O is different than anything that can be accomplished in Java 1.3. It requires native support from the local operating system. Allow me to quote from Chapter 12:

The traditional Java solution for allowing the CPU to race ahead of the network is a combination of buffering and multithreading. Multiple threads can generate data for several different connections at once and store that data in buffers until the network is actually ready to send it; this approach works well for fairly simple servers and clients without extreme performance needs. However, the overhead of spawning multiple threads and switching between them is nontrivial. For instance, each thread requires about one extra megabyte of RAM. On a large server that may be processing thousands of requests a second, it�s better not to assign a thread to each connection, even if threads for subsequent requests can be reused, as discussed in Chapter 5. The overhead of thread management severely degrades system performance. It's faster if one thread can take responsibility for multiple connections, pick one that's ready to receive data, fill it with as much data as that connection can manage as quickly as possible, then move on to the next ready connection. To really work well, this approach needs to be supported by the underlying operating system. Fortunately, pretty much every modern operating system you're likely to be using as a high-volume server supports such non-blocking I/O.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!