Introducing the Multi-target Application

Objectives

After completing this lesson, you will be able to:

  • Explain the build and deploy processes of a multi-target application project

Introducing the Multi-Target Application

Multi-Target Application

Recent trends and progress with programming languages, software design architectures, such as, micro-services, protocols like OData, and the diversity of multi-tiered and distributed deployment platforms have accelerated the trend towards applications constructed out of smaller, decoupled, and diverse modules.

Today, business applications are composed of multiple parts that are developed using different languages and technologies and deployed to a variety of target runtime environments.

This diversity introduces many lifecycle challenges. Developing, deploying, and configuring all the separate parts of complex applications involves many steps, typically target-platform or application-server specific. Required services must be pre-configured and provisioned, the different modules must be connected together, configured, and deployed across multiple platforms in a strictly specific order, often using different tools, repeated for testing, staging, and production environments. Zero-downtime upgrades is another complexity.

The term Multi-Target Application (MTA) Is used to express this diversity of lifecycle management requirements, and because other terms, such as, distributed, polyglot, multi-module, multi-tier, or multi-headed application, do not capture this diversity. However, in essence, MTAs are just a natural evolution of existing multi-part applications.

Platform as a service (PaaS), such as, Cloud Foundry offers improvements over traditional application servers in the flexible way they support diverse application runtime technologies through containerization. This introduces much more freedom to choose implementation technologies (Java, Node.js, Python, and so on). Applications can be decomposed into multiple modules, which can be scaled independently and technologies can be chosen to best fit each module's concern. For instance, a scalable request pre-processing proxy implemented in Node.js might façade a Java module implementing business logic. While this is favorable from a runtime aspect, development and lifecycle management of such distributed applications gets harder.

Building and deploying the MTA project

You can include multiple application development projects (for example Java or Node.js projects) in a unique multi-target application project. To do this, include the original projects in sub-folders and create the multi-target development descriptor file mta.yaml.

The whole project is then built to a unique .mtar archive file.

Such archive is deployed to Cloud Foundry resulting in the creation of multiple "integrated" run-time applications.

The following video illustrates the build and deploy process of a multi-target application project.

Introducing the MTA Cloud Foundry CLI plugin

Describing the Commands provided with the CF MTA Plugin

The CF MTA plugin supports the following commands:

Command NameDescription
deployDeploy a new multi-target app or sync changes to an existing one
undeployUndeploy (remove) a multi-target app
mtasList all multi-target apps
mtaDisplay health and status for a multi-target app
mta-opsList active multi-target app operations
download-mta-op-logs / dmolDownload logs of multi-target app operation
bg-deployDeploy a multi-target app using blue-green deployment
purge-mta-configPurge stale configuration entries

Common Use scenarios for MTAs

Use Case for MTA: Multi-Layer Architecture

There is an option to realize your application based on a multi-layer architecture so that each layer is scaled independently, depending on the needs at any given time. With the MTA approach, the entire MTA application is built to a single .mtar file, then all of the module applications are deployed collectively. Module dependencies are also managed.

Use Case for MTA: Integrate Different Programming Languages

You can integrate modules written in different languages in a unique MTA, to re-use code or use the best language based on the specific requirement.

Log in to track your progress & complete quizzes