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
13 - Java networking basics
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
Java arrived on the scene just as computer networking was expanding from isolated local area networks outward to the whole world via the Internet. The developers of Java quickly realized that exploiting the vast potential of networks would become a major activity for programmers in this new interconnected world, so they built a wide array of networking capabilities into the language. This capability grew with each new version of Java and became one of the primary reasons for its popularity.
In this chapter we review the basics of TCP/IP (Internet) networking and some of the tools that Java provides to exploit it [1, 2]. In the rest of Part II we examine many of the more sophisticated networking capabilities of Java with an emphasis on how they could benefit scientific and engineering applications.
Internet basics
As shown in Figure 13.1, networking architecture is based on the concept of layers of protocols. (The more formal OSI – Open System Interconnection – model has seven layers but this one shows the essential layer definitions.) Each layer has its own standardized protocol and standardized application programming interface (API), which allows the next higher layer to communicate with it. Internally, the layers can be implemented in different ways as long as they provide the standard API. For example, the Network layer does not know if the physical layer is Ethernet or a wireless system because the software device drivers respond to the function calls the same way.
- Type
- Chapter
- Information
- Publisher: Cambridge University PressPrint publication year: 2005