What Is a Service?
According to OASIS, a service is a mechanism that enables access to one or more capabilities, where the access is provided using a prescribed interface.1 The prescribed interface is any mechanism for getting data in or out of a service. It can be synchro‐ nous, such as a request/response model, or asynchronous, such as a model that is
![]() |
1 Reference model for service-oriented architecture v1.0. (n.d.). Retrieved June 14, 2021, from OASIS.
producing and consuming events. This is the service public interface, as shown in Figure 14-1, which provides a means for communicating and integrating with other system components.
![]() |
Figure 14-1. Communication between services
Randy Shoup likens a service’s interface to a front door. All data going into or out of the service has to pass through the front door. Furthermore, a service’s public inter‐ face defines the service itself: the functionality exposed by the service. A well- expressed interface is enough to describe the functionality implemented by a service. For example, the public interface illustrated in Figure 14-2 explicitly describes the functionality of the service.
![]() |
Figure 14-2. A service’s public interface
This takes us to the definition of microservice.