The first thing to do when building a distributed application is sketch a rough architecture. The key words here are sketch and rough. We’re talking about a preliminary design at the level of the architectural diagrams used in the previous chapters. And even though doing this can be difficult, there are several facts that help you out:
There are really only four or five different distributed application architectures. Most distributed applications look fairly similar to each other.
You’re using Java and RMI. This narrows down some design choices for you and helps you make design decisions.
You don’t actually have to get it right. Rough architectures are not cast in stone; they help you focus and narrow the rest of the design, turning vast and open-ended questions into things that are easier to think about. In particular, they let you place pieces of functionality at various points on the network, and help you design the remote interfaces. This effectively turns the task of designing a distributed application into the task of designing single-process components.
Once you’ve sketched a rough architecture a few times, the process becomes ingrained. However, the following sequence of steps can be helpful the first few times:
Figure out what you’re going to build. This might sound obvious, but it’s important. You need some set of requirements for the application, not just what it does for any given single user, but also information ...