Updated on 2023-07-14 GMT+08:00

Overview

A weather forecast microservice application provides weather forecasts as well as displays ultraviolet (UV) and humidity indexes. This section uses a weather forecast application to demonstrate the application scenarios of the microservice architecture and best practices of managing the runtime environment, building applications, and governing microservices on ServiceStage.

A weather forecast microservice application consists of a frontend component and backend components. The frontend component weathermapweb is developed using Node.js to discover backend components. The backend components are developed using the Java chassis and Spring Cloud microservice development frameworks and include microservices weather, forecast, fusionweather, weather-beta, and edge-service.

Where,

  • weathermapweb is an interface microservice developed by Node.js.
  • weather is a microservice that provides the current weather of a specified city.
  • forecast is a microservice that provides weather forecast for a specified city in the next few days.
  • fusionweather is an aggregation microservice that provides comprehensive weather forecast functions by accessing the weather and forecast microservices.
  • weather-beta is a new version of the weather microservice. It allows you to query the UV index of a specified city.
  • edge-service is the unified portal for all other microservices.

Table 1 lists the backend components.

Table 1 Components of the weather forecast microservice application

Microservice development framework

Component Name

Java Chassis

weather

forecast

fusionweather

weather-beta

edge-service

weathermapweb

Spring Cloud

weather

forecast

fusionweather

weather-beta

edge-service

weathermapweb

The following figure shows the logical networking and calling relationship of the weather forecast application:

ServiceStage supports deployment and access of microservice applications developed based on Java chassis and Spring Cloud using source code and software packages.

This document describes how to host and manage a microservice application on ServiceStage by using the weather forecast microservice application developed based on Java chassis and two microservice application deployment methods (Deploying a Weather Forecast Microservice Using Source Code and Deploying a Weather Forecast Microservice Using a Software Package).