Build a Microservice Architecture

Purpose

Learn how to quickly establish the dependencies of service components through documentation.

Kato supports the native Service Mesh microservice architecture. Once an application is deployed on the Kato platform, it has been connected to this microservice architecture.

After Deploying a service component from source code and Deploying an application from the application market, we have successfully deployed two service components. Now, let’s create a dependency between them.

The significance of this is to allow the Java demo to communicate with Mysql5.7 (stand-alone), and the business level can call the database normally.

Meaning

Through practical operation, users can initially experience how service components communicate in Kato. Users need to read Communication between Components to understand the principle.

Prerequisites

Establish Dependencies

  • In the application topology interface, click switch to edit mode.

  • Complete the establishment of dependencies by dragging and dropping.

  • Follow the prompts to complete the update operation of downstream service components (Java demo example)

After the dependency is established, the Java demo can communicate with Mysql5.7 (stand-alone) normally.

The connection information is defined by the connection information in the Dependency page of Mysql5.7 (stand-alone version).

This is a set of environment variables that will take effect at the same time in Mysql5.7 (stand-alone version) and Java demo examples that depend on it.

In the Java demo example, by reading the value of the corresponding environment variable, you can reference the connection information of Mysql5.7 (stand-alone) in the code, including Mysql5.7 (stand-alone), connection address, port, user name, and password.

Next

Next, we will explore how to publish the applications made by this group of users to the application market provided by Kato to form their own application templates.