Contents at a Glance


Part 1. CORBA Meets Java 64 Pages
Part 2. Core CORBA/Java 50 Pages
Part 3. The Dynamic CORBA 46 Pages
Part 4. CORBA and Its Competitors 170 Pages
Part 5. The Existential CORBA 68 Pages
Part 6. JDBC: 2 Tier Versus 3-Tier 129 Pages
Part 7. The Grand Finale: CORBA/Java Club Med 88 Pages



What This Book Covers

Whether you're a seasoned Java programmer, a distributed objects expert, or looking to be a little of both, this book gives you the programming know-how you need to combine these two technologies into workable client/server solutions for the Object Web. Full of working code, tutorials, and design tradeoffs, this book:

  • Covers everything from simple ORBs to object activation
  • Uses tutorials and client/server benchmarks to compare CORBA and its competitors--including Java/RMI, Java/DCOM, Sockets, and HTTP/CGI.
  • Covers in detail Netscape's ORB: VisiBroker for Java; it shows you how to use Caffeine to write CORBA/Java applications without IDL.
  • Provides a Debit-Credit benchmark for JDBC databases to compare 2-tier vs 3-tier client/server solutions.
  • Provides a Web-based Club Med client/server application using CORBA, Java, JDBC, and applets.
  • Shows how to use CORBA's dynamic facilities such as callbacks, dynamic invocations, object introspection, and the interface repository.
  • Compares the performance of C++ ORBs with Java ORBs.
  • Comes with a CD-ROM containing over 15 Java-based client/server applications.

More Detail

This book explains the intersection of CORBA and Java in depth. It is also a gentle guide to client/server programming with CORBA and Java. The book introduces CORBA to Java programmers. However, we do not introduce Java to CORBA programmers. We assume that you have a working knowledge of the Java JDK 1.0. If you don't, there are dozens of books that provide an introduction to the JDK 1.0 facilities. Our book starts with JDK 1.1; we explain in-depth anything that has to do with the new JDK facilities--for example, RMI and JDBC.

This book consists of seven parts that build on each other:

  • Part 1 starts with an overview of what CORBA and Java do for each other. We explain the 3-tier Object Web client/server model. We provide a birds-eye view of CORBA/IIOP for Java programmers. We provide an in-depth overview of Java for CORBA architects and programmers. We explain the new Java Enterprise model and services. Even seasoned Java programmers, will find new information here; it prepares you for life in the post JDK 1.0 era. If you come from a client/server background, this discussion will help you understand what the Object Web is all about. We conclude the Part by picking a CORBA/Java ORB for this book.
  • Part 2 starts our exploration of the CORBA/Java programming model. We develop a small client/server Ping that serves as a mini crash-course in core CORBA/Java programming. This simple program can be surprisingly useful. In Part 2, we use it to do the following performance comparisons: local invocations versus remote invocations, Java applets versus Java client applications, JIT compilers versus interpreters, and C++ ORBs versus Java ORBs. Finally, we use the program to show you how to call a C++ object from Java, and vice versa.
  • Part 3 shows you how to program CORBA's dynamic object facilities. The dynamic CORBA lets you create very flexible systems where clients and servers discover each other at run time. We look at at two very versatile programming mechanisms: dynamic invocations and callbacks. With CORBA's dynamic invocations, any Java client can construct a remote method call on-the-fly, and then invoke it. With callbacks, clients can also be servers. Callbacks let servers call Java clients wherever they are. You will learn how to create multithreaded Java objects that are both clients and servers. This chapter also provides Ping performance numbers for CORBA's dynamic facilities.
  • Part 4 compares CORBA/Java with its competitors: 1) legacy Internet middleware--including Java Sockets and CGI/HTTP, and 2) non-CORBA Java ORBs--including JavaSoft's RMI and Microsoft's DCOM. We also cover Caffeine, which is the Netscape/Visigenic answer to RMI; it provides an RMI-like programming environment on top of CORBA/IIOP. Caffeine shows you how to write CORBA distributed objects without CORBA IDL. It demonstrates a pure Java alternative to the traditional CORBA development process. In addition to the programming examples, we provide in-depth tutorials on each of these technologies. We also run Ping benchmarks to give you a feeling for their relative performance. It's not every day that you see the same Java client/server program running over Sockets, HTTP/CGI, RMI, DCOM, and CORBA.
  • Part 5 is about the Existential CORBA. We explain CORBA's Interface Repository and introspection facilities. We show you how an object discovers its intergalactic universe. We also cover CORBA's activation services. An ORB must provide the illusion that that all of its objects--and there can be millions of them--are up and running and active all the time, even though they are not. This illusion keeps the client code simple but shifts the implementation burden to the server side. You must write code that cooperates with the ORB when you start and stop your objects or when the ORB starts up or shuts down.
  • Part 6 is about 2-tier and 3-tier client/server programming using Java, CORBA, and JDBC. In some circles, client/server is synonymous with SQL databases. This is not too surprising considering that SQL database is the most prevalent application model for client/server, today. So one way to determine if CORBA and Java are ready for client/server prime time is to see how well they do database. Part 6 starts out with the world's longest tutorial chapter on JDBC. Then we develop a Debit-Credit benchmark that compares the performance of 2-tier versus 3-tier client/server systems using CORBA, Java, and JDBC. We will also compare the performance of static SQL versus Dynamic SQL, JDBC-style. You will learn--in a fun way--some of the architectural trade-offs of the client/server discipline.
  • Part 7 concludes--in grand finale style--with a Web-based Club Med Client/Server application. This chapter brings it all together. We show you how to associate applet-generated AWT GUI events with method invocations on CORBA/Java server objects. In this 3-tier client/server application, the middle-tier objects interact with both the Web-applet clients and the Club Med JDBC database. We also include a poor man's TP Monitor for managing multithreaded server objects.

A lot of this material is previously uncharted territory. As far as we know, this is first book that puts through the wringer client/server systems that use CORBA, Java, and JDBC. Consequently, we will will develop complete 3-tier client/server frameworks for these technologies from scratch.

Who Is This Book For?

  • This book is for anyone involved with client/server programming, distributed objects, or Java. It's particularly important for the following readers:
  • Java programmers who need to understand client/server computing, distributed objects, CORBA/IIOP, and JDBC. This book prepares you for the post JDK 1.0 world.
  • CORBA programmers who need to understand Java. This book is all about CORBA/Java integration.
  • MIS programmers who are evaluating CORBA, Java, and Intranets. This book provides you with tons of benchmarks and apple-to-apple comparisons with other forms of middleware--including DCOM, HTTP/CGI, RMI, and Sockets.
  • Client/server architects who are thinking about using CORBA or Enterprise Java (or both). This is the first book that exhaustively looks at Java as a client/server platform. You'll get the good, bad, and the ugly.
  • Eventually, every programmer will have to write a Java or distributed object program. So you'll find that reading this book is time well-spent. If nothing else it will give you a jump-start for programming the Object Web. Non-programmers can read the tutorials, benchmarking chapters, and the detailed comparisons. However, you may be better off reading one of our other books (see next section). This one is really for programmers.

Is CORBA/Java Ready for Client/Server Prime Time?

The Object Web is still under construction. It seems that everyone in the software business is building a piece of it today. In this book, we look at two of the Object Web's core technologies: Java and CORBA/IIOP. Java provides the mobile code foundation; CORBA provides the distributed object infrastructure. They are both foundations of the Object Web.

So, what is the state of these two foundation technologies? Can we use CORBA and Java today to deploy a new generation of Web-based client/server applications? Are they ready for mission-critical prime-time? What is the state of the CORBA/Java integration? These are the questions we try to answer in this book.

We found that the best way to get a reality check on where things stand is to write lots of working code. Currently, most Java applications have been standalone demos, but the real value of Java is when you build portable clients to much larger transactional systems. This is where CORBA comes into the picture. We hope to show you in this book that you can use CORBA and Java today to create some dynamite client/server applications. So we will put CORBA and Java through the wringer by running benchmarks. We will also be developing industrial-strength client/server applications using CORBA and Java. Finally, we will look at some of the alternatives--including DCOM/ActiveX, RMI, HTTP/CGI, and Sockets.

The CORBA/Java Integration Story

You've probably already heard about CORBA or you wouldn't be reading this book. And, of course, you've heard of Java or you wouldn't be from this planet. We assume that you think that CORBA and Java are important new technologies, which is why you purchased this book. So what could be left to say about CORBA and Java? It may come as a surprise, but very little has been said about how CORBA and Java play together. This entire book is about the intersection of these two important object models.

We must warn our Java readers that CORBA is lot more than just an ORB--it is also a very complete distributed object platform. CORBA extends the reach of your applications across networks, languages, component boundaries, and operating systems. CORBA supplements Java with a rich set of distributed services that includes introspection, dynamic discovery, transactions, relationships, security, naming, and so on. CORBA provides the missing link between the Java portable application environment and the world of intergalactic objects.

Now, we must warn our CORBA readers that Java is much more than just another language with CORBA bindings. Java is a mobile object system; it's a portable operating system for running objects. Java will allow your CORBA objects to run on everything from mainframes to Network Computers, to cellular phones. JavaSoft seems to be defining new portable services every day--including server-side components, security, persistence, and system management. Like CORBA, Java in the process of building a gigantic object infrastructure.

Luckily, these two object infrastructures complement each other well. Java starts where CORBA leaves off. CORBA deals with network transparency,

Available at Bookstores Everywhere
For more information visit http://www.wiley.com/compbooks
ISBN: 0471-16351-1, 658 pages, 1997, $44.99 US