Chapter 7. Remote Services
At some point in the evolution of a large web application, you're going to need to start looking beyond the simple web and database server model. As you increase the number of components in your system, you'll need to find ways to have those components communicate with each other.
When we talk about remote services, we don't necessarily mean services that reside outside of our local network, or even outside of our web server. We can define a remote service as any service that we might want to talk to that isn't in process on our web server.
As such, a database server provides a remote service. We don't usually need to worry about how we connect and talk to a database server, since our language tools tend to take care of that for us. At some point, when you have multiple database clusters storing different data in interesting ways, you may want to abstract your database layer away with a common interface to it all. How your application talks to this layer and how the layer talks to the backing database store is a question that may fall into the realm of remote services.
This chapter deals with protocols, formats, and strategies for exchanging data between two or more components in a web application. We'll look at the underlying technologies, the common protocols and encoding formats, and we'll examine what roles they can play in a well-architected web application.