Designing RMI Applications
We present some of the ideas from:
William Grosso,
Java RMI
, 2002. Chapters 5-10, 12-17, 19-20, 22.
Code examples were downloaded from and belong to
O'Reilly
.
1
Sketch a Rough Architecture
2
Bank Example
3
Two Choices
4
Choosing
*
4.1
Does Each Instance Require Shared Resource?
4.2
How Well Server Scales or Replicates to Multiple Machines?
4.3
Is Single Server Enough?
4.4
How to Handle Multiple Simultaneous Clients?
4.5
Is Code Correct?
4.6
How Fatal is Server Crash?
4.7
How Easy Adding Functionality?
5
Writing the Interface
5.1
Should We Pass Method Objects?
5.2
Pass Objects As Arguments or Use Primitive Values?
5.3
Return Values: Objects or Primitive Values?
5.4
Do Individual Method Calls Waste Bandwidth?
5.5
Is Each Conceptual Operation A Single Method Call?
5.6
Does The Interface Expose The Right Amount Of Metadata?
5.7
Have We Identified A Reasonable Set Of Distributed Exceptions?
6
Building Data Objects
7
Server Implementation
8
Server Implementation 2
9
Launch Code
10
Building the Client
11
Serialization
11.1
Using Serialization
11.2
Making a Class Serializable
11.2.1
Ensure Serialization of Instance-Level State
11.2.2
Ensure Superclass State is Handled Correctly
11.2.3
Override equals() and hashCode()
12
Threading
12.1
Ensure Data Integrity
12.2
Client Maintains Lock
12.3
Using a Lock Expiry Thread
12.4
Minimize Time in Synchronized Blocks.
12.5
Be Careful When Using Container Classes.
*
12.6
Use Containers To Mediate Inter-thread Communication.
13
Testing
13.1
Test Strategy
14
Naming Services
15
RMI Garbage Collection
16
RMI Logging
16.1
Specialized Logs
17
Security Policy
17.1
Security Manager Permissions
17.2
The Security Manager
18
HTTP Tunneling
Entire Presentation with Notes
Copyright © 2009
José M. Vidal
.
All rights reserved.
17 March 2004, 09:42AM