Book contents
- Frontmatter
- Contents
- Preface
- Acknowledgements
- Part I Introduction to Java
- Part II Java and the network
- 13 Java networking basics
- 14 A Java web server
- 15 Client/server with sockets
- 16 Distributed computing
- 17 Distributed computing – the client
- 18 Java Remote Method Invocation (RMI)
- 19 CORBA
- 20 Distributed computing – putting it all together
- 21 Introduction to web services and XML
- Part III Out of the sandbox
- Appendix 1 Language elements
- Appendix 2 Operators
- Appendix 3 Java floating-point
- Index
- References
18 - Java Remote Method Invocation (RMI)
Published online by Cambridge University Press: 08 January 2010
- Frontmatter
- Contents
- Preface
- Acknowledgements
- Part I Introduction to Java
- Part II Java and the network
- 13 Java networking basics
- 14 A Java web server
- 15 Client/server with sockets
- 16 Distributed computing
- 17 Distributed computing – the client
- 18 Java Remote Method Invocation (RMI)
- 19 CORBA
- 20 Distributed computing – putting it all together
- 21 Introduction to web services and XML
- Part III Out of the sandbox
- Appendix 1 Language elements
- Appendix 2 Operators
- Appendix 3 Java floating-point
- Index
- References
Summary
Introduction
Chapters 16 and 17 described the client/server or distributed object paradigm at a somewhat abstract level using the UML notation language. Because of the abstract nature of that discussion there was almost no Java code in either of those chapters. In fact, the only place that any code snippets appeared at all was to illustrate UML concepts in a familiar concrete Java environment.
Now we will begin to explain how to really implement the distributed object paradigm using Java Remote Method Invocation (RMI). By the end of this chapter, we will have some real code that demonstrates simple communication between two distributed Java objects, though we still won't have a running application using the architecture of Chapters 16 and 17. That complete application will be developed in Chapter 20.
Before getting to the real code, we must first describe how distributed computing can be implemented. The concepts are not particularly new, nor are they unique to Java. However, just as in other areas, the Java platform offers advantages and an easy programming style that are absent in other languages. These advantages are discussed as we explain how distributed computing works. While the full capabilities of RMI are beyond the scope of this book, we will learn the basics of RMI, and with these skills we can implement the distributed architecture described in Chapters 16 and 17.
How distributed computing works
Consider a conventional (non-distributed) computer program, be it written in Java or some other language.
- Type
- Chapter
- Information
- Publisher: Cambridge University PressPrint publication year: 2005