Chapter 2. Reference Architecture Environment
This reference architecture designs, develops and deploys a distributed polyglot microservice architecture on top of Red Hat OpenShift. The application architecture is based on the design laid out and explained in depth in the reference architecture document on EAP Microservice Architecture, implemented on Red Hat OpenShift in previous reference architecture work.
The starting point for this project includes six services, where two of these are database services based on the standard and supported MySQL image. The remaining four images in the original reference architecture are based on the supported JBoss EAP xPaaS image and rely on the Source to Image (S2I) functionality to build and deploy. The EAP images are customized for two of these services to add a MySQL datasource.
Figure 2.1. Service Diagram, only Java EE implementation

The services in the original implementation are loosely coupled, relying only on REST web service calls to communicate with one another. As a result, any of them can be replaced with a new implementation, as long as the API and behavior is not changed.
In this reference architecture, a new implementation is provided for two of these services, replacing the Java EE implementation with Ruby and Node.js, respectively.
The Product service is rewritten in Node.js, while the Billing service is rewritten in Ruby. No changes are required to the rest of the environment, and the new Product service will continue to talk to the same Product MySQL database.
This is the new diagram after replacing two services. The services in blue are the ones that have changed:
Figure 2.2. Service Diagram, polyglot implementation

All Red Hat OpenShift services can be configured and scaled with the desired number of replicas. In a default Red Hat OpenShift installation, the nodes are the only targets for service deployment. However, the master hosts can also be configured as scheduleable in order to host service replicas.
The presentation service is the only entry point to the application and serves HTML to the client browser over HTTP. This web tier is stateless, and can therefore be replicated without concern for multicast communication or alternative EAP clustering setup. This service relies on the product, sales, and billing services, while the first two in turn rely on the MySQL product-db and sales-db services.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.