geonetwork / geonetwork/geonetwork-microservices

Access indexing service using a proper web client

Open
#12 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
15
Forks
21
PR merge metrics
No merged PRs in 30d

Description

`org.fao.geonet.searching.controller.EsHttpProxy` uses manual http connection handling to query the indexing service at the URL defined by `${gn.index.url}`.

In order for the app to be "cloud native", it must do so in a way that supports automatic client-side load balancing, so that the value of `${gn.index.url}` can be the name of the indexing service, and the load-balanced http client can discern which service instance to hit (usually it has a cache of service instances retrieved from discovery-service).

The easiest way of achieving so is using spring's `WebClient` (see https://spring.io/guides/gs/spring-cloud-loadbalancer/)
The recommended way is to create an [OpenFeign](https://docs.spring.io/spring-cloud-openfeign/docs/2.2.5.RELEASE/reference/html/) client for the target service, which under the hood will use `WebClient`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.