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
17 - Distributed computing – the client
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
Chapter 16 introduced distributed computing and enough UML to describe server-side interactions. In this chapter we describe the design of the client for a distributed scientific application in which the computationally intense calculations are performed on a remote server. Like the server, the client details necessarily depend heavily on the calculation being performed and the data that is to be presented to the user. Nevertheless we can provide some general guidelines that should apply to many scientific applications.
Multithreaded client
Recall that the server in Chapter 16 is running on a remote machine, at least conceptually, and is generating results continuously as the simulation is running. To avoid problems with intervening firewalls, we designed the server to be polled by the client rather than using a callback from the server to the client when new data is available. That is, the client must poll the server periodically to retrieve the results being calculated by the server. Assuming that the server calculation is generating results somewhat uniformly, we clearly would prefer for the client to poll the server on a regular basis. Meanwhile, once the client receives the current set of results, the client must display them to the user in some fashion and allow the user to interact with the displayed data. Whenever human users are involved, one can be assured that the user's actions will not be uniform and regular.
- Type
- Chapter
- Information
- Publisher: Cambridge University PressPrint publication year: 2005