To be Reviewed By: Geode Developers

Authors:Jinmei Liao

Status: Draft | Discussion | Active | Dropped | Superseded

Problem

Management REST API needs to implement GET resource request, with resource being a region, index, gateway receiver etc, if the resource (e.g. region) belongs to multiple groups, it might be configured differently on each group. So the problem is:

  1. should we include "group" in the GET resource request?
  2. if not on the first question, should we return a list of configurations for that resource?
  3. If yes on the 2nd question, how should we represent it in the response? GET request is supposed to return just one entity per REST specs.

Anti-Goals

Not changing how the configuration is saved on the backend.

Solution

Here are the answers for the 3 questions we raised before:

  1. should we include "group" in the GET resource request?   
    NO. Even though "group" is a core concept of Geode, a lot of our beginning users don't use it and has no idea that their servers are actually in a "cluster" group, and we don't want to force them to always need to put "cluster" in their get request. Also, entities like "region", even though they might be configured differently on different groups (one group hosts data, another as a proxy), they still have the same id, and act as one region. So in user's mind, Region is a the resource on a cluster, not region on a particular group.
  2. if not on the first question, should we return a list of configurations for that resource? 
    YES. this is the only way for them to get a complete view of how the entity is configured in the cluster.

  3. If yes on the 2nd question, how should we represent it in the response? GET request is supposed to return just one entity per REST norms
    We will wrap configuration per group in an EntityInfo object and return the EntityInfo as a response to the request. See detailed swagger documentation here:
    https://cwiki.apache.org/confluence/display/GEODE/1.13.0+Management+REST+API+-+v1#id-1.13.0ManagementRESTAPI-v1-GET/management/v1/regions/{id}

Changes and Additions to Public Interfaces

EntityInfo: https://github.com/apache/geode/blob/develop/geode-management/src/main/java/org/apache/geode/management/api/EntityInfo.java

Performance Impact

None

Backwards Compatibility and Upgrade Path

N/A

  • No labels