Skip to content

2.2. Backend selection

Haris Chaudhry Mendívil edited this page Sep 25, 2023 · 4 revisions

Definition

This feature is required to choose a particular backend solution for a problem domain.

Implementation

In order to have a mechanism to check the available backend instances running, we could use a service discovery solution. Should be compatible for different backend solutions / languages.

Service discovery

We could use the eureka server / client solution available from spring framework.

There is a concern that eureka might be limited to java solutions but it has some expoed rest operations for universal integrations (we still need to test these for the spring eureka server).

Note: Looks like these endpoints are available for spring-cloud.version = 2022.0.1

  • Spring Cloud Discovery Eureka Server / Client

Location of service discovery in code:

./global-feautures/service-discovery

Common metadata for eureka clients

Using the eureka.instance.metadata-map property in application yml file we could define some common information (as key value pairs) for each backend when they register themselves against the server.

Properties to consider are the following.

  • problem-domain-id: contains the id of the problem domain (example: pd1)
  • summary: contains a small paragraph describing the backend solution
  • tags: comma separated tags (example: Spring, Java, WebMvc)
  • details-list: pipe separated key value pairs, value is a comma separated list (example: Language: Java | Libraries: JUnit, Actuator, Lombok)
  • source-link: url to the source code of backend solution

Clone this wiki locally