|
Updates |
This page contains links to the latest updates of the code and text to the Java 2 Networking book. Periodically new bits will be added so check back once a month or two. The updates here are currently compiled and tested against JDK 1.2.2rc1.
| Return to top |
http://name@passwd:www.vlc.com.au/) it would be treated as part of
the host name. Apparently this still exists but may be fixed in 1.2.3 or later.
The first improvement is that InetAddresses are now cached per connection. The current code used to create a new InetAddress instance for every packet recieved. This is no longer the case.
A future improvement, not currently in 1.2.2, but coming (hopefully) in 1.2.x is the removal of excess data copying. Under the current code, the same array of bytes is copied twice before making it to user level code. The current aim is reduce that to one or zero copies.
| Return to top |
rmiregistry to be a
production system! I find this absolutely amazing that it has taken them 3
years to mention this. They actually suggested that you should be using some
commercial lookup system to locate and load your objects. In particular, they
suggested using the JINI directory services for your normal RMI objects. This
was not just a once off comment by some engineer, but repeated on a number of
occasions by people like Bill Day (normally at JINI associated events).
A really important piece of information that I forgot to put in the book was
how rmic and the stub/skeleton system has changed with Java 2. By
default, rmic generates Java 1.1 compatible output. Java 2 has
removed the need for the skeleton classes to be generated. So, using the
command
rmic -v1.2 classnamesit will produce Java 2 compliant code only. Be warned, if you do this, the RMI classes will no longer be able to talk to Java 1.1 server objects. If you need to do this, then you might want to use the
-vcompat option
instead. Classes generated by this will be able to deal with both 1.1 and 1.2
versions of Java.
Performance: With Java 2, the implementation now makes use of a single socket connection for all objects located on a particular server. While this did not happen by default with Java 1.1 (you could provide your own socket factory to overcome this) this behaviour may be interesting to watch for performance. Generally speaking, it should work much faster but there are situations where the extra traffic over a single connection could cause bottlenecks. Where the old approach will generally be better is if you are using multiple CPU machines where individual socket connections can be serviced in parallel - assuming a native threads implementation of the JVM.
| Return to top |
Compared to v1.4, there are not that many API changes. The main changes are to make the API more consistent, which you'll see later, and addition of new transport mechanisms. Overall, the basic functionality and code hasn't changed from what you've read.
Now, onto the more important items - the updates themselves. Each chapter is treated individually, so please check the appropriate area.
| Return to top |