Service-oriented architecture (SOA)
Service-oriented architecture is a design principle in which software is designed and built in pieces that provide well-defined services when requested. The services may involve performing some activity or returning some information or answer. Most current custom software development is designed and programmed using SOA. Vendor packages that can be purchased usually also provide the capability to interact as services that can be invoked through an API. Service-oriented architecture is particularly relevant in integration because the well-defined nature of the services directs the various systems and technologies on the protocol for interactions. SOA best practice principles include a loose coupling of services, such that the particular technology used in implementations of the various services should not be of interest to users or applications trying to invoke those services, but simply the result. Data services in SOA are those that either provide or update information.
The differences between an ESB and an SOA are first that an ESB is a tool or engine whereas SOA is a design philosophy, and second, that ESB is usually used in a heterogeneous application environment of differing technologies that want to pass data around, whereas SOA implies a more heterogeneous technology environment. An ESB might be connecting some applications that have been written as services, but usually includes applications that have not been written consistently and so the ESB provides the needed layers of technical translation and transformation. If all applications that need to interact have been developed using consistent standards and protocols, then an ESB might be unnecessary, but it still provides the orchestration necessary for the interactions. In the real world of integrating new applications with older legacy applications, an ESB is needed. Coding the overhead of orchestration of the interactions of the application into the code of the application software would be a great burden that is easier to offload onto the specialized ESB technology, just as we offload the overhead of data storage to a database management system.
A bit of tension exists between efficient real-time data integration solutions and pure service-oriented architecture. Software designers and application architects may want to implement all things in an application as services, in order to stay true to the design principles of SOA. However, in most applications it may be more efficient for the application programmers to understand how the data is actually being accessed, such as through an ESB or a database management system (DBMS), and designed and coded according to the efficiencies of the underlying data solutions. This issue can be contentious. Much of the functionality of the service layer, or code, around a data service, such as security access checking, may be redundant, duplicating the services performed by the underlying database management software. Solutions coded to retrieve or update data that don’t take into account the underlying solution may be so slow as to be unworkable, with unacceptable delay in response, or latency.
Improvements in solutions and technologies have started to make the need to understand the underlying implementation of data services somewhat less necessary. See the discussion of data virtualization in Chapter 20 later in this book. Achieving balance of data integration solutions and SOA working together depends on finding the right balance in granularity when defining services. For operational efficiency, it is not a good idea to define data services of too fine granularity; it is better to define application services that perform recognizable business functions. Again, this may contrast with some SOA design principles, but in practice it may be necessary to loosen some pure theory in order to achieve better performance efficiency.
Service-oriented architectures include a registry of available services and how they are invoked. Although originally the protocol used with SOA was SOAP (simple object access protocol), it has become common to use alternative protocols such as REST (REpresentational State Transfer).




