Architecture Test

Over the last few years I’ve had the opportunity to work on several Service Oriented Architecture (SOA) applications. I learned that writing integration tests for such applications is difficult, but important. The challenge lies in the fact that most SOA applications use testing approaches that are well suited for monolithic applications, but these approaches are not always suited for testing SOA applications. It is important because without integration tests it is far too easy for subtle bugs to creep into your code base.

What is SOA?

Service Oriented Architecture might be best understood by first understanding monolithic applications. Your typical long-lived Rails application tends to be a monolithic application. According to Martin Fowler, monolith applications:

…are often built in three main parts: a client-side user interface (consisting of HTML pages and javascript running in a browser on the user’s machine), a database (consisting of many tables inserted into a common, and usually relational, database management system), and a server-side application. The server-side application will handle HTTP requests, execute domain logic, retrieve and update data from the database, and select and populate HTML views to be sent to the browser. This server-side application is a monolith - a single logical executable. Any changes to the system involve building and deploying a new version of the server-side application.

While there might not be a universally accepted definition of SOA, applications that adhere to this approach exhibit some common characteristics. SOA is a style of architecting applications where the underlying structure supports communication between a collection of loosely coupled services over well-defined interfaces.

An example might help clarify:

Figure 1.

In this example, there are two applications that comprise the SOA, the home application and the client application. home has a database and exposes a RESTful interface. The client does not have a database and communicates with home via HTTP. For example, if the client wants a list of all the users, it has to issue a HTTP request to the /users resource of the home application, home queries its database for all the users, and home responds to the client with a JSON respresentation of all the users.

You might also like
Test LEGO Trevi Brunnen (Architecture Legoset 21020
Test LEGO Trevi Brunnen (Architecture Legoset 21020 ...
Living Architecture Test-Bed Clip 1
Living Architecture Test-Bed Clip 1
Architecture Test Film
Architecture Test Film
Related Posts